Skip to content
Snippets Groups Projects
Commit e18423b4 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

fix

parent 78939f21
No related branches found
No related tags found
No related merge requests found
......@@ -27,10 +27,14 @@ class Admin::University::OrganizationsController < Admin::University::Applicatio
def search
@term = params[:term].to_s
language = Language.find_by(iso_code: params[:lang])
@organizations = current_university.organizations
.for_language_id(current_university.default_language_id)
.search_by_siren_or_name(@term)
.ordered
@organizations = @organizations.joins(:language)
.where(languages: {
iso_code: language.iso_code
}) if language.present?
end
def show
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment