How to have a beautiful url like hulu. For example I like to have a
url like this to show the movie detail with an id 1 as
http://localhost:3000/movie/detail/1-movie_name
If via a link, i can do this by writing the to_param method in movie
model like this
def to_param
"#{id}-#{name}"
end
and a like like this
<%=link_to
'Detail', :controller=>'movie',:action=>'detail',:id=>@movie %>
How ever if the someone manually type http://localhost:3000/movie/1,
I still need the url as shown previously.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---