Skip to content

Instantly share code, notes, and snippets.

Created February 7, 2011 17:52
Show Gist options
  • Save anonymous/814818 to your computer and use it in GitHub Desktop.
Save anonymous/814818 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