Merge branch 'develop' into staging

This commit is contained in:
Xavier J 2016-10-10 14:56:34 +02:00
commit ccd543aaf7
2 changed files with 3 additions and 1 deletions

View file

@ -8,7 +8,7 @@ class PreferenceListDossier < ActiveRecord::Base
end
def table_with_s_attr
return self.attr if table.nil? || table.empty?
return 'dossiers.'+self.attr if table.nil? || table.empty?
table + 's' + '.' + attr
end

View file

@ -105,7 +105,9 @@ class DossiersListGestionnaireService
filter = "%"+filter+"%" unless filter.include? '%'
acc += (acc.to_s.empty? ? ''.to_s : " AND ") +
"CAST(" +
preference.table_with_s_attr +
" as TEXT)" +
" LIKE " +
"'" +
filter +