orbit-4-2/app/models/user/role_status.rb

17 lines
246 B
Ruby
Raw Normal View History

class RoleStatus < RoleFilter
has_and_belongs_to_many :users
belongs_to :role
scope :can_display,where(disable: false)
def self.get_role_data(role_key)
@role = Role.where(:key =>role_key).first
return @role.id
end
end