On Sep 17, 2:10 am, Maciek <[email protected]> wrote: > Hi, I'm new to sequel and it took me a while to figure out how to set > timestamps on a model. > Is this the right way? Are there any better alternative ways? > > class Category < Sequel::Model(:categories) > plugin :timestamps, :update_on_create => true > end
If you want to enable timestamps for only that model, and your columns are named created_at and updated_at, and you want to set updated_at at creation time, then yes, that is correct. No, there aren't any better alternative ways. Jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
