Module: Saucy::User::InstanceMethods

Defined in:
lib/saucy/user.rb

Instance Method Summary collapse

Instance Method Details

#admin_of?(account) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#member_of?(account_or_project) ⇒ Boolean

Returns:

  • (Boolean)


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

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