Before applying a book! on an instance I need to fill in a form. This form to my understanding doesn't need to store the time_start and the time_end in the database, so how would I do this? Stuff did work with hard coding the times with some 'plain old ruby'.
Currently I keep on getting "Interval not available". I made sure my times are converted to DateTime, but still not working.
Maybe you guys could support this issue which I am sure is very fundamental to many, by adding some supporting guidance?
I would be very thankful.
class Renting < ApplicationRecord
# renting is purely for form data handling
attribute :time_start, :datetime
attribute :time_end, :datetime
end
This gave a TimeWithZone object still, so to be sure I used .to_datetime on it, but to no avail.
Before applying a
book!
on an instance I need to fill in a form. This form to my understanding doesn't need to store thetime_start
and thetime_end
in the database, so how would I do this? Stuff did work with hard coding the times with some 'plain old ruby'.Currently I keep on getting "Interval not available". I made sure my times are converted to DateTime, but still not working.
Maybe you guys could support this issue which I am sure is very fundamental to many, by adding some supporting guidance? I would be very thankful.
This gave a TimeWithZone object still, so to be sure I used
.to_datetime
on it, but to no avail.