Bir Rails görünümünde tarihleri biçimlendirmeye çalışıyorum. tarih nil iseRaylar Biçim Nil Tarih
<td><%= l order.ship_date, :format => :long %></td>
Bu işe yaramazsa:
Object must be a Date, DateTime or Time object. nil given.
iyi "Raylar" çözüm nedir?
<td><%= order.ship_date ? l(order.ship_date, :format => :long) : "Some text" %></td>
Benim durumumda, bir 'text_field' kullanıyorum ve arıza güvenli çalışıyor. Teşekkürler! Sonuç: '<% = f.text_field: due_date,: value => (l (order.due_date) eğer order.due_date.present?)%>' –