Merge branch 'develop' into staging
This commit is contained in:
commit
ccd543aaf7
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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 +
|
||||
|
|
Loading…
Reference in a new issue