I have created a meeting room booking form, which contains a calendar with the dates on.
When you click new booking the url has the date of the day the user clicks on in the parameters, so the url looks like http://www.example.com/bookings/new?date=2013-11-27.
This then sets the date column in my db when the form is submitted.
However when the form dosn’t save becasue it dosn’t match validations the date parameter gets removed from the url, how do I keep it in there so that the date can be saved?
My create action looks like this
def create
@booking = Booking.new(booking_params)
if @booking.save
redirect_to root_url
else
render "new"
end
end
Thanks