Fix with migration bad table value for nil table attr

This commit is contained in:
Xavier J 2016-09-27 17:53:46 +02:00
parent b3d454a53b
commit 5ff37a270e
6 changed files with 16 additions and 7 deletions

View file

@ -8,7 +8,7 @@ class Backoffice::PreferenceListDossierController < ApplicationController
def add
PreferenceListDossier.create(
libelle: params[:libelle],
table: params[:table],
table: (params[:table].empty? ? nil : params[:table]),
attr: params[:attr],
attr_decorate: params[:attr_decorate],
bootstrap_lg: params[:bootstrap_lg],