Sha256: 08c217182bb77e9282e3002b0e1287864bea18e65a08c0d92e38b97a4dd9767a

Contents?: true

Size: 275 Bytes

Versions: 8

Compression:

Stored size: 275 Bytes

Contents

module OrganizationListHelper
  def organizations_for(user)
    (user.accessible_organizations + [Organization.central]).uniq.compact
  end

  def organization_switch_url(organization)
    organization.url_for(controller_name == 'users' ? root_path : request.path)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mumuki-laboratory-5.11.0 app/helpers/organization_list_helper.rb
mumuki-laboratory-5.10.4 app/helpers/organization_list_helper.rb
mumuki-laboratory-5.10.3 app/helpers/organization_list_helper.rb
mumuki-laboratory-5.10.2 app/helpers/organization_list_helper.rb
mumuki-laboratory-5.10.1 app/helpers/organization_list_helper.rb
mumuki-laboratory-5.10.0 app/helpers/organization_list_helper.rb
mumuki-laboratory-5.9.1 app/helpers/organization_list_helper.rb
mumuki-laboratory-5.9.0 app/helpers/organization_list_helper.rb