I have a simple model setup:

class Badge < Sequel::Model
  many_to_many :players
end

class Player < Sequel::Model
  many_to_many :badges
end

The "map" table is "badges_players", and there's no model but the
schema is basically:

create_table(:badges_players) do
  foreign_key :badge_id, :badges
  foreign_key :player_id, :players
  Time :created_at, :null => false
end

I can't figure out how to get Sequel to set the "created_at" column
when doing:

@player.add_badge(badge)

I tried creating a model for the "badges_players" table, but
associations doesn't seem to ever use the model no matter what I do.
This seems like something that shouldn't be as complicated as I think
I'm making it. Anyone have any advice?

Thanks,

Sam Gibson

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