Closed tobmatth closed 9 years ago
Please note that this is just cosmetics. You will still need to go through the setter, e.g.
class MyClass < AR:B
hstore_accessor :properties, my_attribute: :hash
end
c = MyClass.new
c.my_attribute
=> {}
c.my_attribute[:one] = 1 # won't work
=> 1
c.my_attribute
=> {}
c.my_attribute = {one: 1} # will work
=> {:one=>1}
c.my_attribute
=> {:one=>1}
Ok, so i'm closing here as as fixed in pull request #31 in a much more elegant way...
Fixes #20