views:

19

answers:

1

I was wondering if there was a way to make controller methods in rails available only for specific HTTP methods (GET, POST, etc.).

I guess I can create a filter to do that but it seems to me that it is something that is available out-of-the-box in rails.

Is it?

A: 

Yes. See http://guides.rubyonrails.org/routing.html section 3.11.1. You can specify what method should be accepted for each route.

calmh