Module: OrganizationListHelper

Defined in:
app/helpers/organization_list_helper.rb

Instance Method Summary collapse

Instance Method Details

#organization_switch_url(organization) ⇒ Object



6
7
8
# File 'app/helpers/organization_list_helper.rb', line 6

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

#organizations_for(user) ⇒ Object



2
3
4
# File 'app/helpers/organization_list_helper.rb', line 2

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