On Thursday, October 10, 2013 3:27:29 PM UTC-7, Dave Bradford wrote:
>
> Am I missing something or is the expected behavior wrong? Using "Dirty"
> plugin -- why does Model.new(attrs) or Model.create(attrs) not have
> "column_changes"? I would expect to see the columns set from 'attrs' marked
> as changed....
>
The specified behavior of Model.new/changed_columns is that columns passed
in are not considered as changed (with or without the dirty plugin), they
are considered as the original values. If you want them considered changed:
Model.new.set(attrs)
Model.create{|m| m.set(attrs)}
Thanks,
Jeremy
--
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/groups/opt_out.