forked from saurabh/orbit4-5
17 lines
382 B
Ruby
17 lines
382 B
Ruby
class RoleStatus
|
|
include Mongoid::Document
|
|
field :key, type: String
|
|
field :title, type: String, localize: true
|
|
field :disable, type: Boolean, default: false
|
|
|
|
scope :can_display, ->{ where(disable: false) }
|
|
|
|
has_and_belongs_to_many :member_profile
|
|
belongs_to :role
|
|
|
|
def self.get_role_data(role_key)
|
|
@role = Role.find_by(key: role_key)
|
|
return @role.id
|
|
end
|
|
end
|