lib/authpds/helpers/institution/current_institution_helper.rb in authpds-1.1.3 vs lib/authpds/helpers/institution/current_institution_helper.rb in authpds-1.1.4
- old
+ new
@@ -11,12 +11,12 @@
# 2. institution associated with the client IP
# 3. primary institution for the current user
# 4. first default institution
def current_primary_institution
@current_primary_institution ||= case
- when (institution_param.present? && institutions[institution_param])
- institutions[institution_param]
+ when (institution_param.present? && all_institutions[institution_param])
+ all_institutions[institution_param]
when primary_institution_from_ip.present?
primary_institution_from_ip
when (@current_user && current_user.primary_institution)
current_user.primary_institution
else
@@ -32,13 +32,13 @@
end
end
private :primary_institution_from_ip
# All institutions
- def institutions
- @institutions ||= Institutions.institutions
+ def all_institutions
+ @all_institutions ||= Institutions.institutions
end
- private :institutions
+ private :all_institutions
end
end
end
end