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