Hi Jeremy

I'm testing this dataset method to destroy records, and I realized that my 
dummy data in the test wasn't updating the updated_at flat appropriately. I 
have the timestamps plugin installed. Here's the pseudo-code:

create(:record).update(updated_at: 9.days.ago)
create(:record).update(updated_at: 7.days.ago)
create(:record).update(updated_at: 1.day.ago)
create(:record).update(updated_at: 1.day.from_now)

They all have the same updated_at in the end. I assume that sequel is 
overwriting whatever I'm passing as a parameter. The way I see it, I set 
the value and "ask" sequel to save without timestamps (not documented, 
probably non-existing) or there's an instance method to update columns 
which bypassed model validations (something like #update_column in AR), 
which I didn't find in the documentation. What do you think it's the best 
approach? 

-- 
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 https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to