Orbit/app/models/user/sub_role.rb

11 lines
208 B
Ruby
Raw Normal View History

class SubRole < Attribute
belongs_to :role
2011-12-20 06:35:28 +00:00
has_and_belongs_to_many :users
# Get an sub_role from key
def self.get_sub_role_from_key(key)
self.first(:conditions => {:key => key})
end
end