(To start the application) Run
1) bundle install 2) rake db:migrate 3) rake db:seed ( This will add the data from csv to the DB) 4) rake cucumber ( To run the cucumber tests) 5) rails server
Go to the homepage ( It will redirect to the search page )
I have used
1) twitter bootstrap for the ui. 2) jQuery UI for calendar (In start and end date). 3) Cucumber for the TDD.
First of all I selected all the bookings that were in the date range given by the users. Then I have checked for the capacity, if on those bookings days any other guest can be accomodated. If other guests can’t be accomodated then eliminate those room from the Total rooms that are present, as thr is no extra space left. Else keep those rooms in the list as it can accomodate the number of guest given in the search form on the given range of dates.