Merge branch 'master' of git.ukko.mx:psanchezp/quiniela-mundial
Showing
5 changed files
with
11 additions
and
20 deletions
... | @@ -21,8 +21,10 @@ class ApplicationController < HeimdallEngine::ApplicationController | ... | @@ -21,8 +21,10 @@ class ApplicationController < HeimdallEngine::ApplicationController |
21 | end | 21 | end |
22 | 22 | ||
23 | def check_results | 23 | def check_results |
24 | - return [] unless @current_user | 24 | + return [] unless current_user |
25 | - @current_user.bets.join(:matches).order(match: { date: :ASC }).limit(5) | 25 | + current_user.bets.joins(:match).order('matches.date desc') |
26 | + .where.not(result: nil) | ||
27 | + .limit(5) | ||
26 | end | 28 | end |
27 | 29 | ||
28 | def recent_matches | 30 | def recent_matches | ... | ... |
1 | -header class="mdc-top-app-bar navbar" | 1 | +header class="mdc-top-app-bar navbar" style='margin-top: -8px; margin-left: -8px;' |
2 | div class="mdc-top-app-bar__row" | 2 | div class="mdc-top-app-bar__row" |
3 | section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-start" | 3 | section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-start" |
4 | a href="/" class="material-icons mdc-top-app-bar__navigation-icon" aria-label="Home" alt="Home" home | 4 | a href="/" class="material-icons mdc-top-app-bar__navigation-icon" aria-label="Home" alt="Home" home |
5 | section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-end" | 5 | section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-end" |
6 | a href="/bets" class="material-icons mdc-top-app-bar__navigation-icon" aria-label="Attach_Money" alt="Attach_Money" attach_money | 6 | a href="/bets" class="material-icons mdc-top-app-bar__navigation-icon" aria-label="Attach_Money" alt="Attach_Money" attach_money |
7 | a href="/logout" class="material-icons mdc-top-app-bar__navigation-icon" aria-label="Exit_to_app" alt="Exit_to_app" exit_to_app | 7 | a href="/logout" class="material-icons mdc-top-app-bar__navigation-icon" aria-label="Exit_to_app" alt="Exit_to_app" exit_to_app |
... | \ No newline at end of file | ... | \ No newline at end of file |
8 | - | ||
9 | - / <section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-end" role="toolbar"> | ||
10 | - / <a href="#" class="material-icons mdc-top-app-bar__action-item" aria-label="Download" alt="Download">file_download</a> | ||
11 | - / <a href="#" class="material-icons mdc-top-app-bar__action-item" aria-label="Print this page" alt="Print this page">print</a> | ||
12 | - / <a href="#" class="material-icons mdc-top-app-bar__action-item" aria-label="Bookmark this page" alt="Bookmark this page">bookmark</a> | ||
13 | - / </section> | ... | ... |
1 | -h1 Results | 1 | +h1 Your most recent results |
2 | -table.results | 2 | +table |
3 | - thead | ||
4 | - th Team 1 | ||
5 | - th Team 2 | ||
6 | - th Points obtained | ||
7 | tbody | 3 | tbody |
8 | tr | 4 | tr |
9 | - @results.each do |r| | 5 | - @results.each do |r| |
10 | - td = r.local | 6 | + td = r.match.local |
11 | - td = r.visit | 7 | + td VS |
8 | + td = r.match.visit | ||
12 | td = r.points | 9 | td = r.points | ... | ... |
-
Please register or login to post a comment