0
我想將默認時間從現在起設置爲2小時。所以我寫了這個和平的代碼:沒有將ActiveSupport :: TimeWithZone隱式轉換爲Integer
<%= f.datetime_select :starts_at, :default => { :hour => 2.hours.from_now, :minute => 0 }, :order => [:day, :month, :year] %>
我得到了一個錯誤:
no implicit conversion of ActiveSupport::TimeWithZone into Integer
是的。我也試過這個。我有錯誤:參數超出範圍 – MikeAndr