I have a postscontroller, with a show method: def show ... end I want to match the following url pattern to this controller action: /posts/123 Shoudl go to the postscontroller, show method with id=123 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Have a read of this: http://guides.rubyonrails.org/routing.html It explains all about the rails routing system. On 15/10/12 10:50, S Ahmed wrote:> I have a postscontroller, with a show method: > > def show > ... > end > > > I want to match the following url pattern to this controller action: > > /posts/123 > > Shoudl go to the postscontroller, show method with id=123 > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 15 October 2012 02:50, S Ahmed <sahmed1020-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have a postscontroller, with a show method: > > def show > ... > end > > > I want to match the following url pattern to this controller action: > > /posts/123 > > Shoudl go to the postscontroller, show method with id=123As I guess that you are a beginner with Rails I suggest that you work through a good tutorial on Rails so that you will understand the basic principles. railstutorial.org is good and is free to use online. Make sure that any tutorial you try is for rails 3 and make sure you install the exact version of rails that the tutorial is based on. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.