diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-09-28 12:31:45 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-09-28 12:31:45 -0500 |
commit | 28bf2fa03886e3ea7d873375239395b91b8e530e (patch) | |
tree | 0d3d6982867a9c054b1f6f45c285a303d8d28cc8 /actionpack/lib/action_view | |
parent | ea609b265ffc30cac00bf09a262027f96964ed6f (diff) | |
download | rails-28bf2fa03886e3ea7d873375239395b91b8e530e.tar.gz rails-28bf2fa03886e3ea7d873375239395b91b8e530e.tar.bz2 rails-28bf2fa03886e3ea7d873375239395b91b8e530e.zip |
Protect body ivar from being clobbered by the mailer template assigns
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/base.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 8c00670087..77015ad06b 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -296,9 +296,9 @@ module ActionView #:nodoc: @assigns.each { |key, value| instance_variable_set("@#{key}", value) } if @controller - variables = @controller.instance_variables + variables = @controller.instance_variable_names variables -= @controller.protected_instance_variables if @controller.respond_to?(:protected_instance_variables) - variables.each {|name| instance_variable_set(name, @controller.instance_variable_get(name)) } + variables.each { |name| instance_variable_set(name, @controller.instance_variable_get(name)) } end @assigns_added = true |