Here is the problem i\'m stuck on. I want to pass the javascript variables to the rails controller.
You can use something like
$.post("/bookings?booking[phone]=" + phone + "&booking[book_date]=" + mdate)
It will go to BookingsController#create action with params hash:
BookingsController#create
{ booking: { phone: "entered from prompt", book_date: "26 December 2013" } }