This app will use a ActiveRecord to track movies and actors through a many-to-many relationship. Users will be able to see the relationship between two actors.
Behavior | Input | Output |
---|---|---|
goes to homepage | user visits homepage | and sees two forms to add two different actors names |
submit two forms to see the degree | the user inputs two actors | user sees the separation between the two inputted actors |
clicks on individual movie | user goes to the movie page | user sees the cast of the movie |
user clicks on the individual actor link | user taken to actor page | user can see all movies the actor has been in |
- Ensure connection to the Internet
- On a mac using spotlight search type in terminal
- Once in terminal enter the following commands to clone the file to your desktop and open the repository:
$ cd desktop
$ git clone https://github.com/nrsantamaria/six-degrees.git
$ cd six-degrees
$ atom .
- This will open all of the files included in the six-degree folder including Gemfile, Gemfile.lock, app.rb, README.md, views folder, spec folder, public folder, lib folder
- To make changes to the text on the page that the user will see you will need to access the files in the views folder.
- To make changes to the look of the file you will need to access the styles.css file.
- To make changes to the functions of the form you will need to access the actor.rb file or movie.rb file. Be sure to make necessary changes to your specs.
- In the terminal enter the following commands to start postgres:
- run ruby app.rb in the terminal:
- visit localhost:4567/load-db
- close terminal window that has ruby app.rb after loading desired amount of movies into database
$ postgres
- Open another tab in the terminal enter the following commands to start the databases needed for this program:
$ rake db:create
$ rake db:migrate
$ rake db:test:prepare
- Navigate to the repo on your desktop and run the following in a new tab in the terminal to start the sinatra server:
$ ruby app.rb
- Open your browser and enter
localhost:4567
as the URL path.
If autocomplete is not working, inspect element and click error message and it will display the actors name that is causing the error Example Brad "Chip" Pope, Rodney "Bear" Jackson. Find the actor by their id, and delete the actor from your database.
Please contact Nicole Santamaria at [email protected] if you have any questions.
- HTML
- CSS
- JavaScript
- Jquery
- Bootstrap
- Postgres
- psql
- Ruby
- Sinatra
API from IMDB
This software is licensed under MIT license.
Copyright (c) 2017 Nicole Santamaria, James Higgins, Nick Powell, Jason Ainsworth