Getting Started - Ruby on Rails - Architectural Overview

#57 Getting Started - Ruby on Rails - Architectural Overview
12/4/2016

Summary

For beginners, learn the basic structure of a Ruby on Rails application and the request lifecycle. Learn how different components of a Rails application interact with each other.
7
rails development 21:50 min

Summary

terminalrails new testapp
# create new app with MySQL instead of SQLite
rails new testapp -d mysql 

Sequence Diagram


terminal# Generating a new controller and action
rails generate controller visitors index

# Generating a new scaffold (controller, view, and model)
rails g scaffold user first_name:string last_name
config/routes.rbRails.application.routes.draw do
  resources :users
  get 'visitors/index'
  root to: 'visitors#index'

  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
00000000000000000000000000000000?d=mm&f=y&s=64
adsr13 said 11 months ago:

Rails 5 eliminates the necessity to call for 'rake db:migrate' to migrate a database. 'bin/rails or rails db:migrate is suffice. All 'rake' tasks are built into the 'rails' command. You may find this information to be valid here: 
https://www.youtube.com/watch?v=OaDhY_y8WTo

635114?v=3&s=64
kobaltz said 11 months ago:

You are very correct. Old habits die hard.

Login to Comment