Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2015
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. def nextpick
  2. @ownerships = Ownership.take(Rails.application.config.counter).last(1)
  3. end
  4.  
  5. def lastthree
  6. @ownerships = Ownership.take(Rails.application.config.counter - 1).last(3)
  7. end
  8.  
  9. <% @ownerships.each do |ownership| %>
  10. <tr>
  11. <td></td>
  12. <td><%= ownership.round %></td>
  13. <td><%= ownership.pick %></td>
  14. <td><%= image_tag ownership.team.logo.url(:medium) %></td>
  15. <td><%= ownership.team.name %></td>
  16.  
  17. <% if ownership.player_id == nil %>
  18.  
  19. <% else %>
  20. <td><%= ownership.player.name %></td>
  21. <% end %>
  22.  
  23. </tr>
  24. <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement