Only mark as changed if value has changed
aaronchi opened this issue · 2 comments
aaronchi commented
hstore_accessor marks the column as changed when set, even if the value is the same. It should only be marked changed if the value is different than the current value.
> user = User.first
> user.changed?
=> false
> user.show_labels
=> true
> user.show_labels = true
> user.changed?
=> true
> user.changes
=> => {"show_labels"=>[true, true]}
thegrubbsian commented
Should be fixed by #35 which is merged now and will be released shortly to rubygems.