Hello,
Migrating from Sequel 3.48.0 to 4.10.0 and noticed a difference with how
the defaults_setter plugin on Sequel::Model works.
I have a Postgres 9.3 database column called "active" with is boolean of
"not null" and "default true". Previously, on 3.48.0 and the defaults
setter plugin, a new Company would look like this in console:
c = Company.new
=> #<Company @values={:active=>true}>
c.values
=> {:active=>true}
c.values[:active]
=> true
c.active
=> true
However now on 4.10.0, it looks like this
c = Company.new
=> #<Company @values={}>
c.values
=> {}
c.values[:active]
=> nil
c.active
=> true
Notice how the company is still defaulting to active being true, but that
data is not in the values hash anymore. As such, it is behaving somewhat
inconsistently. Also, if the data is not in the #values hash, where is it
being stored for the #active method?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.