lib/cream/role.rb in cream-0.6.1 vs lib/cream/role.rb in cream-0.6.3

- old
+ new

@@ -1,7 +1,16 @@ module Cream + class << self + attr_accessor :available_roles + end + module Role def self.available - ::Role.all.map(&:name).to_symbols + return Cream.available_roles if Cream.available_roles.present? + if defined? ::Role + ::Role.all.map(&:name).to_symbols + else + User.roles.to_symbols + end end end end \ No newline at end of file