From 84bacf99d67617421edfbbd787c845afb34a9d06 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Sun, 13 Aug 2006 04:15:22 +0000 Subject: Invoke method_missing directly for hidden actions. Closes #3030. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4755 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/base.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 8c03f86609..2c91266f6f 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -974,11 +974,14 @@ module ActionController #:nodoc: logger.info " Parameters: #{respond_to?(:filter_parameters) ? filter_parameters(params).inspect : params.inspect}" end end - + def perform_action - if self.class.action_methods.include?(action_name) || self.class.action_methods.include?('method_missing') + if self.class.action_methods.include?(action_name) send(action_name) render unless performed? + elsif respond_to? :method_missing + send(:method_missing, action_name) + render unless performed? elsif template_exists? && template_public? render else -- cgit v1.2.3