1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

reduce method calls

This commit is contained in:
Aaron Patterson 2010-11-15 14:22:06 -08:00
parent 0be181bfa0
commit e4591489d1

View file

@ -164,10 +164,10 @@ module ActionDispatch
raise ArgumentError, "missing :action" raise ArgumentError, "missing :action"
end end
{ :controller => controller, :action => action }.tap do |hash| hash = {}
hash.delete(:controller) if hash[:controller].blank? hash[:controller] = controller if controller
hash.delete(:action) if hash[:action].blank? hash[:action] = action if action
end hash
end end
end end