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:
parent
0be181bfa0
commit
e4591489d1
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue