Add type de champ date

Add hour and minute on UI for datetime
This commit is contained in:
Xavier J 2016-06-22 11:25:41 +02:00
parent 2fa10a43e5
commit 4355d4775a
13 changed files with 148 additions and 37 deletions

View file

@ -0,0 +1,15 @@
class ConvertAllDatetimeToDateOnDatabase < ActiveRecord::Migration
class TypeDeChamp < ActiveRecord::Base
end
def change
TypeDeChamp.all.each do |type_de_champ|
if type_de_champ.type_champ == 'datetime'
type_de_champ.type_champ = 'date'
type_de_champ.save
end
end
end
end