[#3477] Accept symbol arguments to sanitized_column

This commit is contained in:
Frederic Merizen 2019-02-26 19:18:24 +01:00 committed by Frederic Merizen
parent f34e65c207
commit e098779c5e

View file

@ -269,7 +269,7 @@ class ProcedurePresentation < ApplicationRecord
end
def self.sanitized_column(table, column)
[(table == 'self' ? 'dossier' : table).pluralize, column]
[(table == 'self' ? 'dossier' : table.to_s).pluralize, column]
.map { |name| ActiveRecord::Base.connection.quote_column_name(name) }
.join('.')
end