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:
José Valim
2010-10-02 08:36:55 +02:00
parent 3eb7f9adee
commit b951522018

View File

@@ -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