0
t.datetimeの形式に関する質問があります。Rubyの日時フォーマットが識別子のために機能しません
私はレールコンソールでコマンド、
Lesson.find(1781).start_time,
はその後
the Tue, 03 May 2016 14:00:00 UTC +00:00
が返されます。
私は
Classtime.find_by(start_time: 'Tue, 03 May 2016 14:00:00 UTC +00:00')
を命じる場合は、nilを返します。
しかし、私は
Classtime.find_by(start_time: Lesson.find(1781).start_time)
を命じる場合、それはLesson.find(1781).start_time
は、ある意味でLesson.find(1781).start_time
のリターンと等しくない、だから私は推測
<Classtime id: 4429, start_time: "2016-05-03 14:00:00", created_at: "2016-04-21 15:53:22", updated_at: "2016-04-21 15:53:22">
を返します。これを引き起こした原因をどのように知ることができますか?
私と共有してください!