Monday, May 9, 2011

Re: [Rails] Route help?

On May 9, 2011, at 6:15 PM, michael_teter wrote:

> Howdy.
>
> I'm trying to figure out how to do the route equivalent to URL-
> rewriting such that http://example.com/some_username is treated like a
> REST get on example.com/users/username (rather than id number).
>
> Suggestions?

If this is the only model you ever plan to expose this way, you could
try making that controller your root path, and then use FriendlyID or
something else to make the connection.

Walter

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate