so i have fixtures that have different seasons, i want to group and display the fixtures by season. On the fixtures index page i want the current season displayed and then link to old seasons. I was thinks some kind of group_by method?
class FixturesController < ApplicationController
@fixtures = Fixture.all
<% @fixtures.each do |fixture| %>
<%= fixture.season.title %></td>
<td><%= fixture.event.title %></td>
<td><%= fixture.home_team.name %></td>
<td><%= fixture.away_team.name %></td>
<td><%= fixture.date %></td>
class Season < ActiveRecord::Base
class Fixture < ActiveRecord::Base
belongs_to :home_team, :class_name => 'Team'
belongs_to :away_team, :class_name => 'Team'