Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def nextpick
- @ownerships = Ownership.take(Rails.application.config.counter).last(1)
- end
- def lastthree
- @ownerships = Ownership.take(Rails.application.config.counter - 1).last(3)
- end
- <% @ownerships.each do |ownership| %>
- <tr>
- <td></td>
- <td><%= ownership.round %></td>
- <td><%= ownership.pick %></td>
- <td><%= image_tag ownership.team.logo.url(:medium) %></td>
- <td><%= ownership.team.name %></td>
- <% if ownership.player_id == nil %>
- <% else %>
- <td><%= ownership.player.name %></td>
- <% end %>
- </tr>
- <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement