aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-09-28 12:31:45 -0500
committerJoshua Peek <josh@joshpeek.com>2008-09-28 12:31:45 -0500
commit28bf2fa03886e3ea7d873375239395b91b8e530e (patch)
tree0d3d6982867a9c054b1f6f45c285a303d8d28cc8 /actionpack
parentea609b265ffc30cac00bf09a262027f96964ed6f (diff)
downloadrails-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')
-rw-r--r--actionpack/lib/action_view/base.rb4
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