This week, we take an idea and turn it into an app. You can see the changes made in code for every step in the lecture notes as follows:
Initial app - https://github.com/rails-decal/fa15-lecture7
rails generate model User
rails g model Quit # g is an alias for generate
# Edit migration files
rake db:migrate
annotate # Generates helpful schema info in model files
gem 'devise' # In Gemfile, not typed in terminal
bundle install
rails generate devise:install
rails generate devise User
rake db:migrate
annotate
# Add validations
rails g migration AddUserIdToQuits
# Edit migration
rake db:migrate
annotate
# Add validation for user_id
# Add routes
rake routes # To review the routes you made
# Make app/controllers/users_controller.rb, app/views/users/show.html.erb
# Edit db/seeds.rb
rake db:setup