orbit-basic/app/models/user/sub_role.rb

11 lines
209 B
Ruby
Raw Normal View History

2011-12-23 10:34:21 +00:00
class SubRole < Attribute
2012-01-16 00:14:05 +00:00
embedded_in :role
2011-12-23 10:34:21 +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