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.

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

Markus,

fantastic, this is what I need! Thank you so much!

Regards,
Istvan

On 6 February 2011 19:46, lix [email protected] wrote:

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs