mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Revert "Perf: refactor _assign method to avoid inject and defining unneeded local var."
_assigns must return a hash.
This reverts commit e66c1cee86.
This commit is contained in:
@@ -192,7 +192,11 @@ module ActionView
|
||||
end
|
||||
|
||||
def _assigns
|
||||
_instance_variables.map { |var| [var[1..-1].to_sym, instance_variable_get(var)] }
|
||||
_instance_variables.inject({}) do |hash, var|
|
||||
name = var[1..-1].to_sym
|
||||
hash[name] = instance_variable_get(var)
|
||||
hash
|
||||
end
|
||||
end
|
||||
|
||||
def _routes
|
||||
|
||||
Reference in New Issue
Block a user