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

Instance Method Details

#base?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/mumuki/domain/helpers/organization.rb', line 27

def base?
  name == 'base'
end

#central?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/mumuki/domain/helpers/organization.rb', line 19

def central?
  name == 'central'
end

#domainObject



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

Returns:

  • (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_nameObject



11
12
13
# File 'lib/mumuki/domain/helpers/organization.rb', line 11

def platform_class_name
  :Organization
end

#slugObject



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

Returns:

  • (Boolean)


23
24
25
# File 'lib/mumuki/domain/helpers/organization.rb', line 23

def test?
  name == 'test'
end

#to_paramObject

API Exposure



57
58
59
# File 'lib/mumuki/domain/helpers/organization.rb', line 57

def to_param
  name
end

#to_sObject



39
40
41
# File 'lib/mumuki/domain/helpers/organization.rb', line 39

def to_s
  name
end

#urlObject



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