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 ! _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
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, Jérôme L <eugenol-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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 ! > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 11/26/05, Liquid <has.sox@gmail.com> 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 _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
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 Schuerig Life is what happens mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org While you''re making plans http://www.schuerig.de/michael/ --Kevin Gilbert, A Long Day''s Life