mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Aesthetic
This commit is contained in:
parent
6bc179075d
commit
5977e7e4d5
3 changed files with 13 additions and 13 deletions
|
@ -76,7 +76,6 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
class Attribute < Struct.new(:coder, :value, :state) # :nodoc:
|
||||
|
||||
def unserialized_value(v = value)
|
||||
state == :serialized ? unserialize(v) : value
|
||||
end
|
||||
|
|
|
@ -175,7 +175,9 @@ class StoreTest < ActiveRecord::TestCase
|
|||
"preferences" => "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nremember_login: true\n",
|
||||
"json_data" => "{\"height\":\"tall\"}", "json_data_empty"=>"{\"is_a_good_guy\":true}",
|
||||
"params" => "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}\n",
|
||||
"account_id"=> @john.account_id }
|
||||
"account_id"=> @john.account_id
|
||||
}
|
||||
|
||||
assert_equal attributes, @john.attributes_for_coder
|
||||
end
|
||||
|
||||
|
@ -188,5 +190,4 @@ class StoreTest < ActiveRecord::TestCase
|
|||
assert_equal dumped, second_dump
|
||||
assert_equal @john, YAML.load(second_dump)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue