Class: Zaikio::Directory::CurrentOrganization
- Defined in:
- lib/zaikio/directory/current_organization.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.find ⇒ Object
8 9 10 |
# File 'lib/zaikio/directory/current_organization.rb', line 8 def self.find all.find_one end |
.find_with_fallback(fallback) ⇒ Object
12 13 14 |
# File 'lib/zaikio/directory/current_organization.rb', line 12 def self.find_with_fallback(fallback) all.with_fallback(fallback).find_one end |
Instance Method Details
#fetch ⇒ Object
30 31 32 |
# File 'lib/zaikio/directory/current_organization.rb', line 30 def fetch self.attributes = get end |
#members ⇒ Object
38 39 40 |
# File 'lib/zaikio/directory/current_organization.rb', line 38 def members memberships.with_fallback.map(&:person) end |
#reload ⇒ Object
34 35 36 |
# File 'lib/zaikio/directory/current_organization.rb', line 34 def reload self.attributes = self.class.find.attributes end |