Salve a tutti,
ho un problema con un campo di tipo datetime, non mi salva i minuti
(salva 0).
Qs sono le righe interessate, prima di chiamare la vista, nel controller
assegno:
@my_date_time = Time.now
nella vista ho:
<p> Data e Ora: <%= select_datetime @my_date_time,
:use_month_numbers => true, :prefix=>'s1', :order => [:day, :month,
:year] %> </p>
e nel controller 'create' ho qs righe:
@data1 = DateTime.civil(params[:s1][:year].to_i,
params[:s1][:month].to_i, params[:s1][:day].to_i,
params[:s1][:hour].to_i, params[:s1][:min].to_i, 0)
@permission.data = @data1
...
@permission.save
Qualcuno mi sa dire perché? ;-)
Grazie
on 2009-06-18 13:19
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.