4. routing (routes.rb)
General rules
root 'pages#main'
get '/patients/:id', to:
‘patients#show’
match 'photos', to: 'photos#show',
via: [:get, :post]
resources and nested resources
url_for
member and collection
11. add it to Gemfile and bundle
rails g devise users
rake db:migrate
Notice the before_action filter
Tip1: check “rails g”after installation.
Tip2: check user model after generation.