Skip to content

Hotel rooms booking application in rails with Ui and backend

Notifications You must be signed in to change notification settings

psbora2/hotel_with_ui

Repository files navigation

- Installation

docker-compose build
docker-compose up

- Create a rails application Hotel to book Rooms.

A Hotel has many rooms.

The hotel website allows booking up to 6 months in advance for room reservations

User can book room in one request by passing booking date, number of user and room_type

hotel app show availability of room by passing booking date

hotel app show availability of room by passing booking date and room_type

user can see his booked room and booking information

I wrote a post on elasticsearch - ElasticSearch

- Solution:

for getting available rooms

first find which rooms are booked in given date (15-2-2017, 20-2-2017)

Booking.where("start_date < ? AND last_date > ? ", 20-2-2017 , 15-2-2017 )

then exclude these rooms from remaining rooms ("Deluxe Rooms")

Rooms.where("room_type = ? AND id NOT IN (?)", Room.room_types["Deluxe Rooms"], Booking.where("start_date < ? AND last_date > ? ", 20-2-2017 , 15-2-2017 ).collect(&:id))

I think you will like this repository Housie

About

Hotel rooms booking application in rails with Ui and backend

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •