Pop-over forms and Rails 4

80 Views Asked by At

I have a page which displays information of a Hotel. The model used here is 'Hotel' Route: localhost:3000/hotel/3

I have a pop-over form for a guest to send her requirement. This uses a different model 'GuestQueries'

I need to redirect guest back to localhost:3000/hotel/3 with a success message. If the success fails then I want to render the pop-up back with errors.

I can't figure out how to handle the routes in case of successful save and in case of errors.

I am using nested routes.

0

There are 0 best solutions below