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

Returns:

  • (Boolean)


14
15
16
# File 'lib/saucy/user.rb', line 14

def admin_of?()
  memberships.exists?(:account_id => .id, :admin => true)
end

#member_of?(account_or_project) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/saucy/user.rb', line 18

def member_of?()
  .has_member?(self)
end