Allow blank for lien_demarche
This commit is contained in:
parent
1bd66b6a9e
commit
8ba8135e6b
4 changed files with 11 additions and 4 deletions
4
.byebug_history
Normal file
4
.byebug_history
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
exit
|
||||||
|
xit
|
||||||
|
xtei
|
||||||
|
cniuecniu
|
|
@ -6,8 +6,11 @@ class Admin::PiecesJustificativesController < AdminController
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
@procedure.update_attributes(update_params)
|
if @procedure.update_attributes(update_params)
|
||||||
flash.now.notice = 'Modifications sauvegardées'
|
flash.now.notice = 'Modifications sauvegardées'
|
||||||
|
else
|
||||||
|
flash.now.notice = 'Une erreur est survenue'
|
||||||
|
end
|
||||||
render 'show', format: :js
|
render 'show', format: :js
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,5 @@ class TypeDePieceJustificative < ActiveRecord::Base
|
||||||
|
|
||||||
validates :libelle, presence: true, allow_blank: false, allow_nil: false
|
validates :libelle, presence: true, allow_blank: false, allow_nil: false
|
||||||
|
|
||||||
validates_format_of :lien_demarche, with: URI::regexp
|
validates :lien_demarche, format: { with: URI::regexp }, allow_blank: true, allow_nil: true
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20170118144306) do
|
ActiveRecord::Schema.define(version: 20170125152856) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
Loading…
Reference in a new issue