Sha256: 58b42c98341aedda81ab52ebc2e6ea31b6a965a1c2c7b5e25655c142f6d467f6

Contents?: true

Size: 379 Bytes

Versions: 109

Compression:

Stored size: 379 Bytes

Contents

module Mumuki::Laboratory::Controllers::CurrentOrganization
  def set_current_organization!
    Organization.find_by!(name: organization_name).switch!
  rescue => e
    Organization.central.switch!
    raise e
  end

  def organization_name
    Mumukit::Platform.organization_name(request)
  end

  def visit_organization!
    current_user.visit!(Organization.current)
  end
end

Version data entries

109 entries across 109 versions & 1 rubygems

Version Path
mumuki-laboratory-7.10.5 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.10.4 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.10.3 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.10.2 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.10.1 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.10.0 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.9.2 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.9.1 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.9.0 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.7.6 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.7.5 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.7.4 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.8.0 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.7.3 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.7.2 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.7.1 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.7.0 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.6.2 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.6.1 lib/mumuki/laboratory/controllers/current_organization.rb
mumuki-laboratory-7.6.0 lib/mumuki/laboratory/controllers/current_organization.rb