Permalink
Browse files

Revert "Pass the proper method_name instead of hardcoding to action_n…

…ame."

This commit was actually correct. The first parameter in process_action
is not necessarily the same as the action_name. Use action_name to
retrieve the action instead.

This reverts commit 4e2bacd.
  • Loading branch information...
1 parent 24fbc47 commit 9575db644396af54fd60f92eb8f81997b3e46941 @josevalim josevalim committed May 6, 2011
@@ -14,7 +14,7 @@ module Callbacks
# Override AbstractController::Base's process_action to run the
# process_action callbacks around the normal behavior.
def process_action(method_name, *args)
- run_callbacks(:process_action, method_name) do
+ run_callbacks(:process_action, action_name) do
super
end
end
@@ -1,22 +1,20 @@
module ActionController
module ImplicitRender
- def send_action(method, *args)
- if respond_to?(method, true)
- ret = super
- default_render unless response_body
- ret
- else
- default_render
- end
+ def send_action(*)
+ ret = super
+ default_render unless response_body
+ ret
end
def default_render
render
end
def method_for_action(action_name)
- super || if template_exists?(action_name.to_s, _prefix)
- action_name.to_s
+ super || begin
+ if template_exists?(action_name.to_s, _prefix)
+ "default_render"
+ end
end
end
end

0 comments on commit 9575db6

Please sign in to comment.