diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-05-30 09:05:18 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-05-30 09:05:18 -0700 |
commit | eb6cee9cf7fd7c22fe3190e2660eeefdd5ec651f (patch) | |
tree | a2a251144c74c86f840b4496a624d154b77264da /activerecord/test | |
parent | 8c77b0a086bb47ef7cd4b827460a51613f94094e (diff) | |
download | rails-eb6cee9cf7fd7c22fe3190e2660eeefdd5ec651f.tar.gz rails-eb6cee9cf7fd7c22fe3190e2660eeefdd5ec651f.tar.bz2 rails-eb6cee9cf7fd7c22fe3190e2660eeefdd5ec651f.zip |
Rename attribute related instance variables to better express intent
`@attributes` was actually used for `_before_type_cast` and friends,
while `@attributes_cache` is the type cast version (and caching is the
wrong word there, but I'm working on removing the conditionals around
that). I opted for `@raw_attributes`, because `_before_type_cast` is
also semantically misleading. The values in said hash are in the state
given by the form builder or database, so raw seemed to be a good word.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/attribute_methods_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb index 4c96c2f4fd..38faffb870 100644 --- a/activerecord/test/cases/attribute_methods_test.rb +++ b/activerecord/test/cases/attribute_methods_test.rb @@ -534,7 +534,7 @@ class AttributeMethodsTest < ActiveRecord::TestCase def test_accessing_cached_attributes_caches_the_converted_values_and_nothing_else t = topics(:first) - cache = t.instance_variable_get "@attributes_cache" + cache = t.instance_variable_get "@attributes" assert_not_nil cache assert cache.empty? |