/leagues (lists all leagues)
/leagues/2 (shows league #2)
/leagues/2/teams (lists all teams in league #2)
/teams/1 (shows team #1)
/teams/1/players (lists all players in team #1)
/players/1 (shows player #1)
I would like ‘user friendly’ urls like:
/west_conference/ (shows league ‘west_conference’)
/west_conference/teams (lists all the teams in the west conference)
/west_conference/eagles (shows the team ‘eagles’)
/west_conference/eagles/players (lists all players on the eagles)
/west_conference/eagles/smith (shows the player ‘smith’)
How do I configure my Rails3 app to add user_friendly urls like this?
/leagues (lists all leagues)
/leagues/2 (shows league #2)
/leagues/2/teams (lists all teams in league #2)
/teams/1 (shows team #1)
/teams/1/players (lists all players in team #1)
/players/1 (shows player #1)
I would like ‘user friendly’ urls like:
/west_conference/ (shows league ‘west_conference’)
/west_conference/teams (lists all the teams in the west conference)
/west_conference/eagles (shows the team ‘eagles’)
/west_conference/eagles/players (lists all players on the eagles)
/west_conference/eagles/smith (shows the player ‘smith’)
How do I configure my Rails3 app to add user_friendly urls like this?
There are several ways to do this. Most of them involve overriding
to_param and/or installing a gem such as friendly_id or permalink_fu.
Search the list archives for ideas; this comes up pretty frequently.