Module: Mumuki::Domain::Helpers::Organization
- Extended by:
- ActiveSupport::Concern
- Includes:
- Mumukit::Platform::Notifiable
- Included in:
- Organization
- Defined in:
- lib/mumuki/domain/helpers/organization.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #base? ⇒ Boolean
- #central? ⇒ Boolean
- #domain ⇒ Object
- #immersed_in?(other) ⇒ Boolean
- #platform_class_name ⇒ Object
- #slug ⇒ Object
- #switch! ⇒ Object
- #test? ⇒ Boolean
-
#to_param ⇒ Object
API Exposure.
- #to_s ⇒ Object
- #url ⇒ Object
- #url_for(path) ⇒ Object
Instance Method Details
#base? ⇒ Boolean
27 28 29 |
# File 'lib/mumuki/domain/helpers/organization.rb', line 27 def base? name == 'base' end |
#central? ⇒ Boolean
19 20 21 |
# File 'lib/mumuki/domain/helpers/organization.rb', line 19 def central? name == 'central' end |
#domain ⇒ Object
51 52 53 |
# File 'lib/mumuki/domain/helpers/organization.rb', line 51 def domain Mumukit::Platform.application.organic_domain(name) end |
#immersed_in?(other) ⇒ Boolean
31 32 33 |
# File 'lib/mumuki/domain/helpers/organization.rb', line 31 def immersed_in?(other) immersible? && other.immersive? && !other.disabled? && target_audience == other.target_audience end |
#platform_class_name ⇒ Object
11 12 13 |
# File 'lib/mumuki/domain/helpers/organization.rb', line 11 def platform_class_name :Organization end |
#slug ⇒ Object
15 16 17 |
# File 'lib/mumuki/domain/helpers/organization.rb', line 15 def slug Mumukit::Auth::Slug.join_s name end |
#switch! ⇒ Object
35 36 37 |
# File 'lib/mumuki/domain/helpers/organization.rb', line 35 def switch! Mumukit::Platform::Organization.switch! self end |
#test? ⇒ Boolean
23 24 25 |
# File 'lib/mumuki/domain/helpers/organization.rb', line 23 def test? name == 'test' end |
#to_param ⇒ Object
API Exposure
57 58 59 |
# File 'lib/mumuki/domain/helpers/organization.rb', line 57 def to_param name end |
#to_s ⇒ Object
39 40 41 |
# File 'lib/mumuki/domain/helpers/organization.rb', line 39 def to_s name end |
#url ⇒ Object
47 48 49 |
# File 'lib/mumuki/domain/helpers/organization.rb', line 47 def url url_for '/' end |
#url_for(path) ⇒ Object
43 44 45 |
# File 'lib/mumuki/domain/helpers/organization.rb', line 43 def url_for(path) Mumukit::Platform.laboratory.organic_url_for(name, path) end |