Module: Saucy::User
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/saucy/user.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#admin_of?(account) ⇒ Boolean
14 15 16 |
# File 'lib/saucy/user.rb', line 14 def admin_of?(account) memberships.exists?(:account_id => account.id, :admin => true) end |
#member_of?(account_or_project) ⇒ Boolean
18 19 20 |
# File 'lib/saucy/user.rb', line 18 def member_of?(account_or_project) account_or_project.has_member?(self) end |