Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 9575db644396af54fd60f92eb8f81997b3e46941 1 parent 24fbc47
@josevalim josevalim authored
View
2  actionpack/lib/abstract_controller/callbacks.rb
@@ -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
View
18 actionpack/lib/action_controller/metal/implicit_render.rb
@@ -1,13 +1,9 @@
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
@@ -15,8 +11,10 @@ def default_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
Please sign in to comment.
Something went wrong with that request. Please try again.