Change team_dashboard URL from :id to :name

28 views
Skip to first unread message

Shaimon Luke

unread,
Jun 2, 2014, 4:39:56 PM6/2/14
to team_da...@googlegroups.com
Can someone tell me how I can change the URL from ID to Name?

Thank You

Frederik Dietz

unread,
Jun 3, 2014, 2:26:31 AM6/3/14
to team_da...@googlegroups.com
Hi,

have a look into Rails to_params, which can be defined in the model to specify the URL. Here's a good background article: http://blog.teamtreehouse.com/creating-vanity-urls-in-rails.

Cheers,
Frederik


On Mon, Jun 2, 2014 at 10:39 PM, Shaimon Luke <sha...@gmail.com> wrote:
Can someone tell me how I can change the URL from ID to Name?

Thank You

--
You received this message because you are subscribed to the Google Groups "Team Dashboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to team_dashboar...@googlegroups.com.
To post to this group, send email to team_da...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/team_dashboard/3c1e791b-f23c-4299-a900-80af6aade1cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shaimon Luke

unread,
Jun 3, 2014, 6:34:43 PM6/3/14
to team_da...@googlegroups.com
Thank you for the update. I'm new to rails. I was hoping you can give me some examples.


Reply all
Reply to author
Forward
0 new messages