Git Product home page Git Product logo

flight-booker's Introduction

Flight Booker

A website for searching, viewing, and booking flights.
You can view the live server running here: https://obscure-temple-39720.herokuapp.com/.

What I Learned

The purpose of building this website was to get exposure to working with advanced forms and using seeded data. In this project a user can search for flights, view the results, and book a flight. This required me to create a database full of data including the airport codes and combinations of different flights including the departure location, arrival location, and the date (the number of passengers were handled in a hidden field and passed into parameters). Creating the associations took a bit of time and thought as I needed to make the connections for a flight from an airport, to an airport, and then eventually connect it all with the final booking page with the passenger information; for this to work properly I had to use #accepts_nested_attributes_for on the booking model.

I then briefly styled the application for presentation purposes, and deployed to Heroku. The biggest learning part of this project for me was reinforcing my understanding of associations which can be tricky, working with seeded data, and getting my forms to submit properly and paying a lot of attention to what is going on in the parameters within the server log.

Update

I tested adding some mailers to this application. I was surprised by overall how easy it was to do, it was very similar to building a new controller and views. An email is sent to each passenger upon completing a booking, but in development mode only. I tried getting this set up in production mode on Heroku, but I ran into an odd error while using SendGrid, which resulted in my account being automatically "banned" upon creating it and trying to add it as a Heroku Addon. I searched the web for a bit and found this to actually be a common issue/bug with SendGrid and Heroku. For now, I've decided to move on, but I feel confident in knowing how to add email distributions if needed.

Gem List

Homepage




Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.