[#3477] Slightly more compact

This commit is contained in:
Frederic Merizen 2019-02-27 17:00:41 +01:00 committed by Frederic Merizen
parent e8747f7c38
commit b4790e5009

View file

@ -184,8 +184,7 @@ class ProcedurePresentation < ApplicationRecord
end
def check_allowed_field(kind, field, extra_columns = {})
table = field['table']
column = field['column']
table, column = field.values_at('table', 'column')
if !valid_column?(table, column, extra_columns)
errors.add(kind, "#{table}.#{column} nest pas une colonne permise")
end