Sha256: cb4eefec0948b332b1a097ec426919c5e22f7eeb6cf2133eaf81e06918fefe9f
Contents?: true
Size: 545 Bytes
Versions: 2
Compression:
Stored size: 545 Bytes
Contents
class UserHasRole < ActiveRecord::Base attr_accessible :user_id, :role_id attr_accessible :user_id, :role_id, as: :admin 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 # role_id :integer # created_at :datetime not null # updated_at :datetime not null #
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
enju_leaf-1.1.0.rc14 | app/models/user_has_role.rb |
enju_leaf-1.1.0.rc13 | app/models/user_has_role.rb |