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"
end
{ :controller => controller, :action => action }.tap do |hash|
hash.delete(:controller) if hash[:controller].blank?
hash.delete(:action) if hash[:action].blank?
end
hash = {}
hash[:controller] = controller if controller
hash[:action] = action if action
hash
end
end