Module: Challah::Rolls::PermissionRole

Defined in:
lib/challah/rolls/permission_role.rb

Instance Method Summary collapse

Instance Method Details

#challah_permission_roleObject



3
4
5
6
7
8
9
10
11
# File 'lib/challah/rolls/permission_role.rb', line 3

def challah_permission_role
  class_eval do
    validates_presence_of :permission_id, :role_id
    validates_numericality_of :permission_id, :role_id

    belongs_to :role
    belongs_to :permission
  end
end