diff options
-rw-r--r-- | actionpack/lib/abstract_controller/rendering.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index a4ce7676f0..1e30593af1 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -69,7 +69,9 @@ module AbstractController variables = instance_variables variables -= protected_instance_variables variables -= DEFAULT_PROTECTED_INSTANCE_VARIABLES - variables.each { |name| hash[name[1..-1]] = instance_variable_get(name) } + variables.each { |name| + hash[name.slice(1, name.length)] = instance_variable_get(name) + } hash end |