On Sep 3, 11:06 am, Tal <[email protected]> wrote:
> Sorry for being such a novice about this. But i'm not sure how to
> setup timestamps using the new plugin inside of a model?

The timestamps plugin is designed so that if you want, you can use it
for all models easily:

  Sequel::Model.plugin :timestamps

Then, as long as your models have created_at and updated_at columns,
they will automatically have before hooks to update the timestamp
columns.

If you only want to do it for a specific model:

  class M < Sequel::Model
    plugin :timestamps, :create=>:added_on, :update=>:modified_on
  end

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to