Monday, July 6, 2009

Workshop 5/6: More Taxi booking system - followup

Must give thanks to Karen's comment. Even though what she said to do was what I had done, the fact that she commented actually triggered the correct outcome for me.

I have got the BookCab form integrated with my OTBS. In order to do this I had to do the following

  1. Move the bookcab method into the VehicleController
  2. Move the bookcab.html.erb file into the views\vehicle\ directory
  3. Change the form action to form_action ="cabtype" instead of "vehicle/cabtype"
  4. modify my application.html.erb file so that the 'Book Cab' link pointed to the correct controller and action.

On the face of it it looks like the variable scope is confined to the MVC that is of interest. In this case it was the cab booking variables in the bookcab view being transferred to the cabtype view.

My next step now is to introduce a login mechanism and enable passenger information to be collected.

1 comment: