Skip to content

Instantly share code, notes, and snippets.

@rafaelss
Forked from anonymous/gist:814818
Created February 7, 2011 18:02
Show Gist options
  • Save rafaelss/814842 to your computer and use it in GitHub Desktop.
Save rafaelss/814842 to your computer and use it in GitHub Desktop.
def index
@trainers = if params[:franchise_id]
Trainer.where(:franchise_id => params[:franchise_id]).all
else
Trainer.all
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment