diff options
author | Nicolas Sanguinetti <contacto@nicolassanguinetti.info> | 2010-04-15 09:56:45 -0300 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-04-15 14:51:25 +0100 |
commit | 4bce5ba600596b5e7afec9b097866ac259c5940a (patch) | |
tree | ffea9f6d8bce50d65651f6422f352042be02d4d4 /actionpack/lib/abstract_controller | |
parent | 68f4e046a7f5db3f7c48a3721bead73a625b6f6e (diff) | |
download | rails-4bce5ba600596b5e7afec9b097866ac259c5940a.tar.gz rails-4bce5ba600596b5e7afec9b097866ac259c5940a.tar.bz2 rails-4bce5ba600596b5e7afec9b097866ac259c5940a.zip |
Avoid deprecation warnings and potential TypeErrors [#4404 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r-- | actionpack/lib/abstract_controller/assigns.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/abstract_controller/rendering.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/abstract_controller/assigns.rb b/actionpack/lib/abstract_controller/assigns.rb index 21459c6d51..4f58cac91f 100644 --- a/actionpack/lib/abstract_controller/assigns.rb +++ b/actionpack/lib/abstract_controller/assigns.rb @@ -6,7 +6,7 @@ module AbstractController def view_assigns hash = {} variables = instance_variable_names - variables -= protected_instance_variables if respond_to?(:protected_instance_variables) + variables -= config.protected_instance_variables if config.respond_to?(:protected_instance_variables) variables.each { |name| hash[name] = instance_variable_get(name) } hash end @@ -18,4 +18,4 @@ module AbstractController view_assigns.each { |k,v| object.instance_variable_set(k, v) } end end -end
\ No newline at end of file +end diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index d2db366140..f1e6f7deb6 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -126,7 +126,7 @@ module AbstractController def view_assigns hash = {} variables = instance_variable_names - variables -= protected_instance_variables if respond_to?(:protected_instance_variables) + variables -= config.protected_instance_variables if config.respond_to?(:protected_instance_variables) variables.each { |name| hash[name.to_s[1..-1]] = instance_variable_get(name) } hash end |