diff options
author | José Valim <jose.valim@gmail.com> | 2010-04-22 12:00:13 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-04-22 12:00:13 +0200 |
commit | 4163ccec2343ee66e2488f067eab2a15260e1219 (patch) | |
tree | 70213bd4d187c88b2fd0bbf05a54eed7ec3a49f7 /actionpack/lib/abstract_controller/assigns.rb | |
parent | a8330c2006e90a6da8f621fdaf1156fa63b4049a (diff) | |
download | rails-4163ccec2343ee66e2488f067eab2a15260e1219.tar.gz rails-4163ccec2343ee66e2488f067eab2a15260e1219.tar.bz2 rails-4163ccec2343ee66e2488f067eab2a15260e1219.zip |
Clean up the config object in ActionPack. Create config_accessor which just delegates to the config object, reducing the number of deprecations and add specific tests.
Diffstat (limited to 'actionpack/lib/abstract_controller/assigns.rb')
-rw-r--r-- | actionpack/lib/abstract_controller/assigns.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/actionpack/lib/abstract_controller/assigns.rb b/actionpack/lib/abstract_controller/assigns.rb deleted file mode 100644 index 21459c6d51..0000000000 --- a/actionpack/lib/abstract_controller/assigns.rb +++ /dev/null @@ -1,21 +0,0 @@ -module AbstractController - module Assigns - # This method should return a hash with assigns. - # You can overwrite this configuration per controller. - # :api: public - def view_assigns - hash = {} - variables = instance_variable_names - variables -= protected_instance_variables if respond_to?(:protected_instance_variables) - variables.each { |name| hash[name] = instance_variable_get(name) } - hash - end - - # This method assigns the hash specified in _assigns_hash to the given object. - # :api: private - # TODO Ideally, this should be done on AV::Base.new initialization. - def _evaluate_assigns(object) - view_assigns.each { |k,v| object.instance_variable_set(k, v) } - end - end -end
\ No newline at end of file |