Ruby on Rails Monday, September 9, 2013

Hi,

I have a link as below

    <%= link_to member.full_name,{:controller => "reports",:action => "student_details", :stud_id => member.id,:vehicle_id=>@vehicle,:type=>@type,:month=>@start_date,:category=>@category } %>

In the routes.rb I have defined as

     map.connect    "/reports/student_details", :controller => reports',:action => 'student_details'

But when I click this link and go to the page, the url is showing as complete url with all the params appended in the link.. I want the url to be shortened like, `reports/student_details/id`
How do I do that.. Please help..


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/15f75b32-3764-418b-a6ba-7f3b035f2732%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment