pradeep83.achu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2013-Sep-09  21:43 UTC
URL issue in rails routing
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
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.
On 9 September 2013 22:43, <pradeep83.achu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 could start by responding to the replies from your previous message that you asked several days ago. It is not good manners to ask a question and not respond when others offer help. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsyk9tw8tP-5fQxADTh0k_DXPCwtmwtWZ%3DjS8EVYZ1nvg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.