Add type de champ date
Add hour and minute on UI for datetime
This commit is contained in:
parent
2fa10a43e5
commit
4355d4775a
13 changed files with 148 additions and 37 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue