Hi,

I'm trying to create a many to many relationship in sequel and I want to 
add created_at in the middle table, like


class User < Sequel::Model
  plugin :timestamps, update_on_create: true


  has_many :roles
end


class Role < Sequel::Model
  plugin :timestamps, update_on_create: true


  has_many :users
end


class RolesUser < Sequel::Model
  plugin :timestamps, update_on_create: true
end


I added both created_at and updated_at columns to users, roles and 
roles_users table, but when I call

user.add_role(role) or role.add_user(user), it won't update created_at and 
updated_at columns for roles_users table, how could I make timestamps 
plugin work for many to many middle table?


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