Sha256: f5a93c40da211a311d2f0a09e7e425808202e2a595def391e5ef35c94596dca6
Contents?: true
Size: 499 Bytes
Versions: 3
Compression:
Stored size: 499 Bytes
Contents
class UserHasRole < ActiveRecord::Base belongs_to :user belongs_to :role accepts_nested_attributes_for :role # validates_uniqueness_of :role_id, scope: :user_id # validates_presence_of :role_id, :user_id end # == Schema Information # # Table name: user_has_roles # # id :integer not null, primary key # user_id :integer not null # role_id :integer not null # created_at :datetime not null # updated_at :datetime not null #
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
enju_seed-0.4.0.beta.1 | app/models/user_has_role.rb |
enju_seed-0.3.0.beta.4 | app/models/user_has_role.rb |
enju_seed-0.3.0.beta.3 | app/models/user_has_role.rb |