Module: Challah::Rolls::PermissionUser

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

Instance Method Summary collapse

Instance Method Details

#challah_permission_userObject



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

def challah_permission_user
  class_eval do
    validates_presence_of :user_id, :permission_id
    validates_numericality_of :user_id, :permission_id

    belongs_to :user
    belongs_to :permission
  end
end