-
Notifications
You must be signed in to change notification settings - Fork 3
Road Map
Dockerfile contains all commands, in order, needed to build a given image
Docker-compose.yml config file for Docker Compose that allows to deploy, combine, and configure multiple Docker containers at the same time
entrypoint.sh instruction that is used to specify the executable which should run when a container is started from a Docker image
tabularasa.sh script for removing db backup and moves existing /tabularasa.sh
Gemfile contains projects gems required to execute associated Ruby code
package.json contains project dependencies
db/migrate contains migration files that describe the data structure of database tables
db/schema.rb where the database schema is defined
db/seeds.rb initial database data
Interests that still do not have at least one video/tutorial
- Interdisciplinary
- Fashion & Cosmetics
- Arts & Crafts
- Reading
- Relaxation
- Travel
- Animals
Ruby on Rails uses the Model-View-Controller (MVC) architectural pattern. The application is separated into the following components
Controllers - app/controllers
A controller handles a web request from the user.
Models - app/models
Models are Ruby classes. They interact with the database, store and validate data
Views - app/views
Views handle the user interface which is rendered and sent back to the client for the browser to display
routes.rb contains the application’s route - /config/routes.rb
How routes are defined in ruby on rails (Reference in Resources)
#code w/us
get "video/home" => "video#home”
#example of different syntax equivalent route
get "video/home", to: "video#home"-
video/homeis the HTTP URL path -
video#homeis the controller action so the request is dispatched to the video controller’s home action
Application Controller - /app/controllers/application_controller.rb
- View for controller - /app/views/static/index.html.erb
- Test for controller - /test/controllers/application_controller
| HTTP Verb | Path | Controller#Action | Purpose |
|---|---|---|---|
| GET | / | application#home | applications landing page |
Api Controller - /app/controllers/api_controller.rb
- Test for controller - /test/controllers/api_controller_test.rb
| HTTP Verb | Path | Controller#Action | Purpose |
|---|---|---|---|
| GET | /interest | api#getInterest | Get videos and concepts related to this interest |
| POST | /newinterest | api#newInterest | |
| POST | /clearinterest | api#clearInterest | |
| POST | /insertinterest | api#interestConcept | |
| POST | /userList | api#getUser | |
| POST | /updateRole | api#accessUser | |
| POST | /newAlert | api#newAlert | |
| POST | /editAlert | api#editAlert | |
| POST | /newVideo | api#newVideo | |
| POST | /like | api#like |
Creator Controller - /app/controllers/creator_controller.rb
- Test for controller - /test/controllers/manage_controller_test.rb
| HTTP Verb | Path | Controller#Action | Purpose |
|---|---|---|---|
| GET | /with/:userid | creator#profile | |
| GET | /creator/add | creator#add | |
| GET | /creater/alert | creator#editalert | |
| POST | /creater/add | creator#addTutorial |
Manage Controller - /app/controllers/manage_controller.rb
- Test for controller - /test/controllers/manage_controller_test.rb
| HTTP Verb | Path | Controller#Action | Purpose |
|---|---|---|---|
| GET | /manage | manage#home |
Sessions Controller - /app/controllers/sessions_controllers.rb
- Test for controller - /test/controllers/sessions_controller_test.rb
| HTTP Verb | Path | Controller#Action | Purpose |
|---|---|---|---|
| GET | /auth/:provider/callback | sessions#omniauth |
User Controller - /app/controllers/user_controllers.rb
- Test for controller - /test/controllers/user_controller_test.rb
| HTTP Verb | Path | Controller#Action | Purpose |
|---|---|---|---|
| GET | /login | user#login | |
| POST | /user/register | user#register | |
| GET | /home | user#error | |
| GET | /logout | user#logout | |
| GET | /userError | user#userError |
Video Controller - /app/controllers/video_controller.rb
- Test for controller - /test/controllers/video_controller_test.rb
| HTTP Verb | Path | Controller#Action | Purpose |
|---|---|---|---|
| GET | /video/home | video#home | |
| GET | /tutorials | video#list |
/test folder contains testing files with subdirectories for unit tests, fixtures, and system tests.
- Ruby On Rails In 60 Minutes - https://www.youtube.com/watch?v=pPy0GQJLZUM&t=2474s
- Ruby On Rails Crash Course 2020 - https://www.youtube.com/watch?v=B3Fbujmgo60
- Learn Ruby on Rails Full Course - https://www.youtube.com/watch?v=fmyvWz5TUWg
- Getting started with Rails - https://guides.rubyonrails.org/getting_started.html
- Ruby on Rails Tutorials - https://www.tutorialspoint.com/ruby-on-rails/index.htm
- Ruby on Rails Documentation on Routing: https://guides.rubyonrails.org/routing.html