diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-22 16:58:45 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-22 16:58:45 +0000 |
commit | 8838020ac445093212787cf01ff253c401ad1744 (patch) | |
tree | e2c125b7d4f2bebee1491d676816e29ce6772f11 /actionpack | |
parent | 8fff2381ca372d1a7c29d02ce59c3dccdfb99a31 (diff) | |
download | rails-8838020ac445093212787cf01ff253c401ad1744.tar.gz rails-8838020ac445093212787cf01ff253c401ad1744.tar.bz2 rails-8838020ac445093212787cf01ff253c401ad1744.zip |
Fixed component method names
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@747 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/components.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/components.rb b/actionpack/lib/action_controller/components.rb index d6ee700b09..c97111ca28 100644 --- a/actionpack/lib/action_controller/components.rb +++ b/actionpack/lib/action_controller/components.rb @@ -24,23 +24,23 @@ module ActionController #:nodoc: private def component_response(options, reuse_response = false) - component_class(options).process(component_request(options), reuse_response ? @response : component_response) + component_class(options).process(request_for_component(options), reuse_response ? @response : response_for_component) end def component_class(options) options[:controller] ? (options[:controller].camelize + "Controller").constantize : self.class end - def component_request(options) - component_request = Marshal::load(Marshal::dump(@request)) - component_request.send( + def request_for_component(options) + request_for_component = Marshal::load(Marshal::dump(@request)) + request_for_component.send( :instance_variable_set, :@parameters, (options[:params] || {}).merge({ "controller" => options[:controller], "action" => options[:action] }) ) - return component_request + return request_for_component end - def component_response + def response_for_component Marshal::load(Marshal::dump(@response)) end end |