Thanks Alex!
On 1/23/06, Alex Young <alex@blackkettle.org>
wrote:>
> Duncan Mac-Vicar wrote:
> > Hi guys, anyone knows where are the get / put method you use in
> > functional controllers test defined? I mean, grep cannot find them :-(
> >
> > I basically need the documentation for put.
>
> actionpack-1.11.2/lib/action_controller/test_process.rb has this:
>
>
> %w( get post put delete head ).each do |method|
> class_eval <<-EOV, __FILE__, __LINE__
> def #{method}(action, parameters = nil, session = nil, flash = nil)
> @request.env[''REQUEST_METHOD''] =
"#{method.upcase}" if @request
> process(action, parameters, session, flash)
> end
> EOV
> end
>
> Not the most enlightening code, but it does go to show how powerful Ruby
> is.
>
> --
> Alex
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060123/25685a08/attachment-0001.html