Restrictings actions to post requests only

Hello

Isn’t there a new declaration for restricting actions to post requests
only ? I cannot retrieve it in the changelog (or did I dream it ?)

Thanks !

If you use the @request.post? in an if statement you can write
conditional
code based on the request method. There is also @request.get? and @
request.xhr?

On 11/26/05, Liquid [email protected] wrote:

If you use the @request.post? in an if statement you can write conditional
code based on the request method. There is also @request.get? and
@request.xhr?

No, I was thinking about declaring method writtent like has_one :foo.
Ex:
post_only :create, :delete

On Friday 25 November 2005 23:47, Jérôme L wrote:

Isn’t there a new declaration for restricting actions to post
requests only ? I cannot retrieve it in the changelog (or did I dream
it ?)

See
http://api.rubyonrails.org/classes/ActionController/Verification/ClassMethods.html

Michael


Michael S. Life is what happens
mailto:[email protected] While you’re making plans
Michael Schürig | Sentenced to making sense --Kevin Gilbert, A Long Day’s Life