madeintandem / hstore_accessor

Adds typed hstore-backed field support to ActiveRecord models.
MIT License
242 stars 47 forks source link

Dirty tracking x_changed? returns true when other hstore properties are changed #65

Closed jwicks closed 9 years ago

jwicks commented 9 years ago

I was able to recreate this bug in 0.9.0+ . This bug does not exist in 0.6.1. FYI I'm using rails 4.0.4

hstore_accessor :properties,
                first_name: :string,
                website_url: :string

user = User.find(1)
user.first_name
=> "Harry"
user.first_name_changed?
=> false # correct
user.website_url = "http://google.com" # Change another hstore property
user.first_name_changed?
=> true # should return false since website_url was changed
christocracy commented 9 years ago

+1 v 1.0.2