lix
2011-Feb-06 16:07 UTC
what is the best way to limit resourceful routes to a certain subset
Hi, I would like use only few routes out of the 7 default. I am wondering what would be the most efficient solution: simple write match rules or use get for this... thank you in advance. I. -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Markus Proske
2011-Feb-06 17:54 UTC
Re: what is the best way to limit resourceful routes to a certain subset
> I would like use only few routes out of the 7 default. I am wondering > what would be the most efficient solution: simple write match rules or > use get for this... >You can define this in your routes.rb: resources :comments, :only => [:create, :destroy] Markus -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
lix
2011-Feb-06 19:46 UTC
Re: what is the best way to limit resourceful routes to a certain subset
Markus, fantastic, this is what I need! Thank you so much! Regards, Istvan On Feb 6, 5:54 pm, Markus Proske <markus.pro...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I would like use only few routes out of the 7 default. I am wondering > > what would be the most efficient solution: simple write match rules or > > use get for this... > > You can define this in your routes.rb: > resources :comments, :only => [:create, :destroy] > > Markus-- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2011-Feb-06 21:31 UTC
Re: Re: what is the best way to limit resourceful routes to a certain subset
On 6 February 2011 19:46, lix <leccine-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Markus, > > fantastic, this is what I need! Thank you so much! > > Regards, > Istvan > > On Feb 6, 5:54 pm, Markus Proske <markus.pro...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > I would like use only few routes out of the 7 default. I am wondering >> > what would be the most efficient solution: simple write match rules or >> > use get for this... >> >> You can define this in your routes.rb: >> resources :comments, :only => [:create, :destroy]Also have a look at the Rails Guide on Routing, it will tell you that and much more. 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.