Where are those defined?

Hi guys, anyone knows where are the get / put method you use in
functional
controllers test defined? I mean, grep cannot find them :frowning:

I basically need the documentation for put.

Thanks
Duncan

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 :frowning:

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.

Thanks Alex!

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