From 060b6f9b50624739a263747acefe7e4c0fadb28d Mon Sep 17 00:00:00 2001 From: laura Date: Tue, 21 Mar 2017 19:28:31 -0700 Subject: [PATCH 01/17] baseline setted up --- .ruby-gemset | 1 - .ruby-version | 1 - Gemfile | 53 ++ Gemfile.lock | 174 ++++ Rakefile | 6 + app/assets/config/manifest.js | 3 + app/assets/images/.keep | 0 app/assets/javascripts/application.js | 16 + app/assets/javascripts/cable.js | 13 + app/assets/javascripts/channels/.keep | 0 app/assets/stylesheets/application.css | 4 + app/channels/application_cable/channel.rb | 4 + app/channels/application_cable/connection.rb | 4 + app/controllers/application_controller.rb | 3 + app/controllers/concerns/.keep | 0 app/controllers/tasks_controller.rb | 29 + app/helpers/application_helper.rb | 2 + app/jobs/application_job.rb | 2 + app/mailers/application_mailer.rb | 4 + app/models/application_record.rb | 3 + app/models/concerns/.keep | 0 app/views/layouts/application.html.erb | 19 + app/views/layouts/mailer.html.erb | 13 + app/views/layouts/mailer.text.erb | 1 + app/views/tasks/index.html.erb | 9 + app/views/tasks/show.erb | 6 + bin/bundle | 3 + bin/rails | 9 + bin/rake | 9 + bin/setup | 34 + bin/spring | 17 + bin/update | 29 + config.ru | 5 + config/application.rb | 15 + config/boot.rb | 3 + config/cable.yml | 9 + config/database.yml | 25 + config/environment.rb | 5 + config/environments/development.rb | 54 ++ config/environments/production.rb | 86 ++ config/environments/test.rb | 42 + .../application_controller_renderer.rb | 6 + config/initializers/assets.rb | 11 + config/initializers/backtrace_silencers.rb | 7 + config/initializers/cookies_serializer.rb | 5 + .../initializers/filter_parameter_logging.rb | 4 + config/initializers/inflections.rb | 16 + config/initializers/mime_types.rb | 4 + config/initializers/new_framework_defaults.rb | 24 + config/initializers/session_store.rb | 3 + config/initializers/wrap_parameters.rb | 14 + config/locales/en.yml | 23 + config/puma.rb | 47 ++ config/routes.rb | 7 + config/secrets.yml | 22 + config/spring.rb | 6 + db/development.sqlite3 | 0 db/seeds.rb | 7 + lib/assets/.keep | 0 lib/tasks/.keep | 0 log/.keep | 0 log/development.log | 754 ++++++++++++++++++ public/404.html | 67 ++ public/422.html | 67 ++ public/500.html | 66 ++ public/apple-touch-icon-precomposed.png | 0 public/apple-touch-icon.png | 0 public/favicon.ico | 0 public/robots.txt | 5 + test/controllers/.keep | 0 test/fixtures/.keep | 0 test/fixtures/files/.keep | 0 test/helpers/.keep | 0 test/integration/.keep | 0 test/mailers/.keep | 0 test/models/.keep | 0 test/test_helper.rb | 10 + vendor/assets/javascripts/.keep | 0 vendor/assets/stylesheets/.keep | 0 79 files changed, 1888 insertions(+), 2 deletions(-) delete mode 100644 .ruby-gemset delete mode 100644 .ruby-version create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 Rakefile create mode 100644 app/assets/config/manifest.js create mode 100644 app/assets/images/.keep create mode 100644 app/assets/javascripts/application.js create mode 100644 app/assets/javascripts/cable.js create mode 100644 app/assets/javascripts/channels/.keep create mode 100644 app/assets/stylesheets/application.css create mode 100644 app/channels/application_cable/channel.rb create mode 100644 app/channels/application_cable/connection.rb create mode 100644 app/controllers/application_controller.rb create mode 100644 app/controllers/concerns/.keep create mode 100644 app/controllers/tasks_controller.rb create mode 100644 app/helpers/application_helper.rb create mode 100644 app/jobs/application_job.rb create mode 100644 app/mailers/application_mailer.rb create mode 100644 app/models/application_record.rb create mode 100644 app/models/concerns/.keep create mode 100644 app/views/layouts/application.html.erb create mode 100644 app/views/layouts/mailer.html.erb create mode 100644 app/views/layouts/mailer.text.erb create mode 100644 app/views/tasks/index.html.erb create mode 100644 app/views/tasks/show.erb create mode 100755 bin/bundle create mode 100755 bin/rails create mode 100755 bin/rake create mode 100755 bin/setup create mode 100755 bin/spring create mode 100755 bin/update create mode 100644 config.ru create mode 100644 config/application.rb create mode 100644 config/boot.rb create mode 100644 config/cable.yml create mode 100644 config/database.yml create mode 100644 config/environment.rb create mode 100644 config/environments/development.rb create mode 100644 config/environments/production.rb create mode 100644 config/environments/test.rb create mode 100644 config/initializers/application_controller_renderer.rb create mode 100644 config/initializers/assets.rb create mode 100644 config/initializers/backtrace_silencers.rb create mode 100644 config/initializers/cookies_serializer.rb create mode 100644 config/initializers/filter_parameter_logging.rb create mode 100644 config/initializers/inflections.rb create mode 100644 config/initializers/mime_types.rb create mode 100644 config/initializers/new_framework_defaults.rb create mode 100644 config/initializers/session_store.rb create mode 100644 config/initializers/wrap_parameters.rb create mode 100644 config/locales/en.yml create mode 100644 config/puma.rb create mode 100644 config/routes.rb create mode 100644 config/secrets.yml create mode 100644 config/spring.rb create mode 100644 db/development.sqlite3 create mode 100644 db/seeds.rb create mode 100644 lib/assets/.keep create mode 100644 lib/tasks/.keep create mode 100644 log/.keep create mode 100644 log/development.log create mode 100644 public/404.html create mode 100644 public/422.html create mode 100644 public/500.html create mode 100644 public/apple-touch-icon-precomposed.png create mode 100644 public/apple-touch-icon.png create mode 100644 public/favicon.ico create mode 100644 public/robots.txt create mode 100644 test/controllers/.keep create mode 100644 test/fixtures/.keep create mode 100644 test/fixtures/files/.keep create mode 100644 test/helpers/.keep create mode 100644 test/integration/.keep create mode 100644 test/mailers/.keep create mode 100644 test/models/.keep create mode 100644 test/test_helper.rb create mode 100644 vendor/assets/javascripts/.keep create mode 100644 vendor/assets/stylesheets/.keep diff --git a/.ruby-gemset b/.ruby-gemset deleted file mode 100644 index 5d2410e51..000000000 --- a/.ruby-gemset +++ /dev/null @@ -1 +0,0 @@ -TaskListRails diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index 197c4d5c2..000000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.4.0 diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..b5fbf94e0 --- /dev/null +++ b/Gemfile @@ -0,0 +1,53 @@ +source 'https://rubygems.org' + +git_source(:github) do |repo_name| + repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") + "https://github.com/#{repo_name}.git" +end + + +# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' +gem 'rails', '~> 5.0.2' +# Use sqlite3 as the database for Active Record +gem 'sqlite3' +# Use Puma as the app server +gem 'puma', '~> 3.0' +# Use SCSS for stylesheets +gem 'sass-rails', '~> 5.0' +# Use Uglifier as compressor for JavaScript assets +gem 'uglifier', '>= 1.3.0' +# Use CoffeeScript for .coffee assets and views +gem 'coffee-rails', '~> 4.2' +# See https://github.com/rails/execjs#readme for more supported runtimes +# gem 'therubyracer', platforms: :ruby + +# Use jquery as the JavaScript library +gem 'jquery-rails' +# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks +gem 'turbolinks', '~> 5' +# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder +gem 'jbuilder', '~> 2.5' +# Use Redis adapter to run Action Cable in production +# gem 'redis', '~> 3.0' +# Use ActiveModel has_secure_password +# gem 'bcrypt', '~> 3.1.7' + +# Use Capistrano for deployment +# gem 'capistrano-rails', group: :development + +group :development, :test do + # Call 'byebug' anywhere in the code to stop execution and get a debugger console + gem 'byebug', platform: :mri +end + +group :development do + # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. + gem 'web-console', '>= 3.3.0' + gem 'listen', '~> 3.0.5' + # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring + gem 'spring' + gem 'spring-watcher-listen', '~> 2.0.0' +end + +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem +gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000..559a4476d --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,174 @@ +GEM + remote: https://rubygems.org/ + specs: + actioncable (5.0.2) + actionpack (= 5.0.2) + nio4r (>= 1.2, < 3.0) + websocket-driver (~> 0.6.1) + actionmailer (5.0.2) + actionpack (= 5.0.2) + actionview (= 5.0.2) + activejob (= 5.0.2) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (5.0.2) + actionview (= 5.0.2) + activesupport (= 5.0.2) + rack (~> 2.0) + rack-test (~> 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.0.2) + activesupport (= 5.0.2) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (5.0.2) + activesupport (= 5.0.2) + globalid (>= 0.3.6) + activemodel (5.0.2) + activesupport (= 5.0.2) + activerecord (5.0.2) + activemodel (= 5.0.2) + activesupport (= 5.0.2) + arel (~> 7.0) + activesupport (5.0.2) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (~> 0.7) + minitest (~> 5.1) + tzinfo (~> 1.1) + arel (7.1.4) + builder (3.2.3) + byebug (9.0.6) + coffee-rails (4.2.1) + coffee-script (>= 2.2.0) + railties (>= 4.0.0, < 5.2.x) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.12.2) + concurrent-ruby (1.0.5) + debug_inspector (0.0.2) + erubis (2.7.0) + execjs (2.7.0) + ffi (1.9.18) + globalid (0.3.7) + activesupport (>= 4.1.0) + i18n (0.8.1) + jbuilder (2.6.3) + activesupport (>= 3.0.0, < 5.2) + multi_json (~> 1.2) + jquery-rails (4.2.2) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + listen (3.0.8) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + loofah (2.0.3) + nokogiri (>= 1.5.9) + mail (2.6.4) + mime-types (>= 1.16, < 4) + method_source (0.8.2) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_portile2 (2.1.0) + minitest (5.10.1) + multi_json (1.12.1) + nio4r (2.0.0) + nokogiri (1.7.1) + mini_portile2 (~> 2.1.0) + puma (3.8.2) + rack (2.0.1) + rack-test (0.6.3) + rack (>= 1.0) + rails (5.0.2) + actioncable (= 5.0.2) + actionmailer (= 5.0.2) + actionpack (= 5.0.2) + actionview (= 5.0.2) + activejob (= 5.0.2) + activemodel (= 5.0.2) + activerecord (= 5.0.2) + activesupport (= 5.0.2) + bundler (>= 1.3.0, < 2.0) + railties (= 5.0.2) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.2) + activesupport (>= 4.2.0, < 6.0) + nokogiri (~> 1.6) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + railties (5.0.2) + actionpack (= 5.0.2) + activesupport (= 5.0.2) + method_source + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (12.0.0) + rb-fsevent (0.9.8) + rb-inotify (0.9.8) + ffi (>= 0.5.0) + sass (3.4.23) + sass-rails (5.0.6) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + spring (2.0.1) + activesupport (>= 4.2) + spring-watcher-listen (2.0.1) + listen (>= 2.7, < 4.0) + spring (>= 1.2, < 3.0) + sprockets (3.7.1) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.0) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + sqlite3 (1.3.13) + thor (0.19.4) + thread_safe (0.3.6) + tilt (2.0.7) + turbolinks (5.0.1) + turbolinks-source (~> 5) + turbolinks-source (5.0.0) + tzinfo (1.2.2) + thread_safe (~> 0.1) + uglifier (3.1.9) + execjs (>= 0.3.0, < 3) + web-console (3.4.0) + actionview (>= 5.0) + activemodel (>= 5.0) + debug_inspector + railties (>= 5.0) + websocket-driver (0.6.5) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + +PLATFORMS + ruby + +DEPENDENCIES + byebug + coffee-rails (~> 4.2) + jbuilder (~> 2.5) + jquery-rails + listen (~> 3.0.5) + puma (~> 3.0) + rails (~> 5.0.2) + sass-rails (~> 5.0) + spring + spring-watcher-listen (~> 2.0.0) + sqlite3 + turbolinks (~> 5) + tzinfo-data + uglifier (>= 1.3.0) + web-console (>= 3.3.0) + +BUNDLED WITH + 1.14.6 diff --git a/Rakefile b/Rakefile new file mode 100644 index 000000000..e85f91391 --- /dev/null +++ b/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require_relative 'config/application' + +Rails.application.load_tasks diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js new file mode 100644 index 000000000..b16e53d6d --- /dev/null +++ b/app/assets/config/manifest.js @@ -0,0 +1,3 @@ +//= link_tree ../images +//= link_directory ../javascripts .js +//= link_directory ../stylesheets .css diff --git a/app/assets/images/.keep b/app/assets/images/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js new file mode 100644 index 000000000..b12018d09 --- /dev/null +++ b/app/assets/javascripts/application.js @@ -0,0 +1,16 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, +// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// compiled file. JavaScript code in this file should be added after the last require_* statement. +// +// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details +// about supported directives. +// +//= require jquery +//= require jquery_ujs +//= require turbolinks +//= require_tree . diff --git a/app/assets/javascripts/cable.js b/app/assets/javascripts/cable.js new file mode 100644 index 000000000..71ee1e66d --- /dev/null +++ b/app/assets/javascripts/cable.js @@ -0,0 +1,13 @@ +// Action Cable provides the framework to deal with WebSockets in Rails. +// You can generate new channels where WebSocket features live using the rails generate channel command. +// +//= require action_cable +//= require_self +//= require_tree ./channels + +(function() { + this.App || (this.App = {}); + + App.cable = ActionCable.createConsumer(); + +}).call(this); diff --git a/app/assets/javascripts/channels/.keep b/app/assets/javascripts/channels/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css new file mode 100644 index 000000000..e02be2e7c --- /dev/null +++ b/app/assets/stylesheets/application.css @@ -0,0 +1,4 @@ +header { + background-color: black; + color: white; +} diff --git a/app/channels/application_cable/channel.rb b/app/channels/application_cable/channel.rb new file mode 100644 index 000000000..d67269728 --- /dev/null +++ b/app/channels/application_cable/channel.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Channel < ActionCable::Channel::Base + end +end diff --git a/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb new file mode 100644 index 000000000..0ff5442f4 --- /dev/null +++ b/app/channels/application_cable/connection.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Connection < ActionCable::Connection::Base + end +end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb new file mode 100644 index 000000000..1c07694e9 --- /dev/null +++ b/app/controllers/application_controller.rb @@ -0,0 +1,3 @@ +class ApplicationController < ActionController::Base + protect_from_forgery with: :exception +end diff --git a/app/controllers/concerns/.keep b/app/controllers/concerns/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb new file mode 100644 index 000000000..80f751adb --- /dev/null +++ b/app/controllers/tasks_controller.rb @@ -0,0 +1,29 @@ +class TasksController < ApplicationController + + def self.random_time + Time.at(rand * Time.now.to_i) + end + + TASKS = [ + { name: "The First Task", description: "", completed_at: random_time }, + { name: "Go to Brunch", description: "" }, + { name: "Go to Lunch", description: "", completed_at: random_time }, + { name: "Go to Second Lunch", description: "" }, + { name: "Play Video Games", description: "", completed_at: random_time }, + { name: "High Five Somebody You Don't Know", description: "", completed_at: random_time }, + { name: "Plant Flowers", description: "", completed_at: random_time }, + { name: "Call Mom", description: "" }, + { name: "She worries, you know.", description: "" }, + { name: "Nap.", description: "", completed_at: random_time } + ] + + def index + @taskslist = TASKS + end + + def show + id = params[:id].to_i + @task = TASKS[id] + + end +end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb new file mode 100644 index 000000000..de6be7945 --- /dev/null +++ b/app/helpers/application_helper.rb @@ -0,0 +1,2 @@ +module ApplicationHelper +end diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb new file mode 100644 index 000000000..a009ace51 --- /dev/null +++ b/app/jobs/application_job.rb @@ -0,0 +1,2 @@ +class ApplicationJob < ActiveJob::Base +end diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb new file mode 100644 index 000000000..286b2239d --- /dev/null +++ b/app/mailers/application_mailer.rb @@ -0,0 +1,4 @@ +class ApplicationMailer < ActionMailer::Base + default from: 'from@example.com' + layout 'mailer' +end diff --git a/app/models/application_record.rb b/app/models/application_record.rb new file mode 100644 index 000000000..10a4cba84 --- /dev/null +++ b/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + self.abstract_class = true +end diff --git a/app/models/concerns/.keep b/app/models/concerns/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb new file mode 100644 index 000000000..92786bc2a --- /dev/null +++ b/app/views/layouts/application.html.erb @@ -0,0 +1,19 @@ + + + + TaskList + <%= csrf_meta_tags %> + + <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> + <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> + + + +
+

Task List

+
+
+ <%= yield %> +
+ + diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb new file mode 100644 index 000000000..cbd34d2e9 --- /dev/null +++ b/app/views/layouts/mailer.html.erb @@ -0,0 +1,13 @@ + + + + + + + + + <%= yield %> + + diff --git a/app/views/layouts/mailer.text.erb b/app/views/layouts/mailer.text.erb new file mode 100644 index 000000000..37f0bddbd --- /dev/null +++ b/app/views/layouts/mailer.text.erb @@ -0,0 +1 @@ +<%= yield %> diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb new file mode 100644 index 000000000..f4b7ce406 --- /dev/null +++ b/app/views/tasks/index.html.erb @@ -0,0 +1,9 @@ +

Tasks

+ + diff --git a/app/views/tasks/show.erb b/app/views/tasks/show.erb new file mode 100644 index 000000000..77160ae37 --- /dev/null +++ b/app/views/tasks/show.erb @@ -0,0 +1,6 @@ +

Tasks#Show

+

<%= @task[:name] %>

+

Description: <%= @task[:description] %>

+

Completed at: <%= @task[:completed_at] %>

+ +<%= link_to "back to tasks list", tasks_path %> diff --git a/bin/bundle b/bin/bundle new file mode 100755 index 000000000..66e9889e8 --- /dev/null +++ b/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +load Gem.bin_path('bundler', 'bundle') diff --git a/bin/rails b/bin/rails new file mode 100755 index 000000000..5badb2fde --- /dev/null +++ b/bin/rails @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +APP_PATH = File.expand_path('../config/application', __dir__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/bin/rake b/bin/rake new file mode 100755 index 000000000..d87d5f578 --- /dev/null +++ b/bin/rake @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/bin/setup b/bin/setup new file mode 100755 index 000000000..e620b4dad --- /dev/null +++ b/bin/setup @@ -0,0 +1,34 @@ +#!/usr/bin/env ruby +require 'pathname' +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a starting point to setup your application. + # Add necessary setup steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + # puts "\n== Copying sample files ==" + # unless File.exist?('config/database.yml') + # cp 'config/database.yml.sample', 'config/database.yml' + # end + + puts "\n== Preparing database ==" + system! 'bin/rails db:setup' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/bin/spring b/bin/spring new file mode 100755 index 000000000..fb2ec2ebb --- /dev/null +++ b/bin/spring @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby + +# This file loads spring without using Bundler, in order to be fast. +# It gets overwritten when you run the `spring binstub` command. + +unless defined?(Spring) + require 'rubygems' + require 'bundler' + + lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) + spring = lockfile.specs.detect { |spec| spec.name == "spring" } + if spring + Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path + gem 'spring', spring.version + require 'spring/binstub' + end +end diff --git a/bin/update b/bin/update new file mode 100755 index 000000000..a8e4462f2 --- /dev/null +++ b/bin/update @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +require 'pathname' +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a way to update your development environment automatically. + # Add necessary update steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + puts "\n== Updating database ==" + system! 'bin/rails db:migrate' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/config.ru b/config.ru new file mode 100644 index 000000000..f7ba0b527 --- /dev/null +++ b/config.ru @@ -0,0 +1,5 @@ +# This file is used by Rack-based servers to start the application. + +require_relative 'config/environment' + +run Rails.application diff --git a/config/application.rb b/config/application.rb new file mode 100644 index 000000000..25ee0e0e3 --- /dev/null +++ b/config/application.rb @@ -0,0 +1,15 @@ +require_relative 'boot' + +require 'rails/all' + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) + +module TaskList + class Application < Rails::Application + # Settings in config/environments/* take precedence over those specified here. + # Application configuration should go into files in config/initializers + # -- all .rb files in that directory are automatically loaded. + end +end diff --git a/config/boot.rb b/config/boot.rb new file mode 100644 index 000000000..30f5120df --- /dev/null +++ b/config/boot.rb @@ -0,0 +1,3 @@ +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) + +require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/config/cable.yml b/config/cable.yml new file mode 100644 index 000000000..0bbde6f74 --- /dev/null +++ b/config/cable.yml @@ -0,0 +1,9 @@ +development: + adapter: async + +test: + adapter: async + +production: + adapter: redis + url: redis://localhost:6379/1 diff --git a/config/database.yml b/config/database.yml new file mode 100644 index 000000000..1c1a37ca8 --- /dev/null +++ b/config/database.yml @@ -0,0 +1,25 @@ +# SQLite version 3.x +# gem install sqlite3 +# +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem 'sqlite3' +# +default: &default + adapter: sqlite3 + pool: 5 + timeout: 5000 + +development: + <<: *default + database: db/development.sqlite3 + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: db/test.sqlite3 + +production: + <<: *default + database: db/production.sqlite3 diff --git a/config/environment.rb b/config/environment.rb new file mode 100644 index 000000000..426333bb4 --- /dev/null +++ b/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative 'application' + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb new file mode 100644 index 000000000..6f7197045 --- /dev/null +++ b/config/environments/development.rb @@ -0,0 +1,54 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded on + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable/disable caching. By default caching is disabled. + if Rails.root.join('tmp/caching-dev.txt').exist? + config.action_controller.perform_caching = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + 'Cache-Control' => 'public, max-age=172800' + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + config.action_mailer.perform_caching = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. + config.assets.debug = true + + # Suppress logger output for asset requests. + config.assets.quiet = true + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true + + # Use an evented file watcher to asynchronously detect changes in source code, + # routes, locales, etc. This feature depends on the listen gem. + config.file_watcher = ActiveSupport::EventedFileUpdateChecker +end diff --git a/config/environments/production.rb b/config/environments/production.rb new file mode 100644 index 000000000..29a40f265 --- /dev/null +++ b/config/environments/production.rb @@ -0,0 +1,86 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass + + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = 'http://assets.example.com' + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + + # Mount Action Cable outside main process or domain + # config.action_cable.mount_path = nil + # config.action_cable.url = 'wss://example.com/cable' + # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. + config.log_level = :debug + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Use a real queuing backend for Active Job (and separate queues per environment) + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "TaskList_#{Rails.env}" + config.action_mailer.perform_caching = false + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Send deprecation notices to registered listeners. + config.active_support.deprecation = :notify + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Use a different logger for distributed setups. + # require 'syslog/logger' + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') + + if ENV["RAILS_LOG_TO_STDOUT"].present? + logger = ActiveSupport::Logger.new(STDOUT) + logger.formatter = config.log_formatter + config.logger = ActiveSupport::TaggedLogging.new(logger) + end + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false +end diff --git a/config/environments/test.rb b/config/environments/test.rb new file mode 100644 index 000000000..30587ef6d --- /dev/null +++ b/config/environments/test.rb @@ -0,0 +1,42 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # The test environment is used exclusively to run your application's + # test suite. You never need to work with it otherwise. Remember that + # your test database is "scratch space" for the test suite and is wiped + # and recreated between test runs. Don't rely on the data there! + config.cache_classes = true + + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + 'Cache-Control' => 'public, max-age=3600' + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + config.action_mailer.perform_caching = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true +end diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb new file mode 100644 index 000000000..51639b67a --- /dev/null +++ b/config/initializers/application_controller_renderer.rb @@ -0,0 +1,6 @@ +# Be sure to restart your server when you modify this file. + +# ApplicationController.renderer.defaults.merge!( +# http_host: 'example.org', +# https: false +# ) diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb new file mode 100644 index 000000000..01ef3e663 --- /dev/null +++ b/config/initializers/assets.rb @@ -0,0 +1,11 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = '1.0' + +# Add additional assets to the asset load path +# Rails.application.config.assets.paths << Emoji.images_path + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. +# Rails.application.config.assets.precompile += %w( search.js ) diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb new file mode 100644 index 000000000..59385cdf3 --- /dev/null +++ b/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } + +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. +# Rails.backtrace_cleaner.remove_silencers! diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb new file mode 100644 index 000000000..5a6a32d37 --- /dev/null +++ b/config/initializers/cookies_serializer.rb @@ -0,0 +1,5 @@ +# Be sure to restart your server when you modify this file. + +# Specify a serializer for the signed and encrypted cookie jars. +# Valid options are :json, :marshal, and :hybrid. +Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb new file mode 100644 index 000000000..4a994e1e7 --- /dev/null +++ b/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb new file mode 100644 index 000000000..ac033bf9d --- /dev/null +++ b/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1en' +# inflect.singular /^(ox)en/i, '\1' +# inflect.irregular 'person', 'people' +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym 'RESTful' +# end diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb new file mode 100644 index 000000000..dc1899682 --- /dev/null +++ b/config/initializers/mime_types.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Add new mime types for use in respond_to blocks: +# Mime::Type.register "text/richtext", :rtf diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb new file mode 100644 index 000000000..671abb69a --- /dev/null +++ b/config/initializers/new_framework_defaults.rb @@ -0,0 +1,24 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 5.0 upgrade. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. + +# Enable per-form CSRF tokens. Previous versions had false. +Rails.application.config.action_controller.per_form_csrf_tokens = true + +# Enable origin-checking CSRF mitigation. Previous versions had false. +Rails.application.config.action_controller.forgery_protection_origin_check = true + +# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. +# Previous versions had false. +ActiveSupport.to_time_preserves_timezone = true + +# Require `belongs_to` associations by default. Previous versions had false. +Rails.application.config.active_record.belongs_to_required_by_default = true + +# Do not halt callback chains when a callback returns false. Previous versions had true. +ActiveSupport.halt_callback_chains_on_return_false = false + +# Configure SSL options to enable HSTS with subdomains. Previous versions had false. +Rails.application.config.ssl_options = { hsts: { subdomains: true } } diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb new file mode 100644 index 000000000..80e157130 --- /dev/null +++ b/config/initializers/session_store.rb @@ -0,0 +1,3 @@ +# Be sure to restart your server when you modify this file. + +Rails.application.config.session_store :cookie_store, key: '_TaskList_session' diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb new file mode 100644 index 000000000..bbfc3961b --- /dev/null +++ b/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. + +# This file contains settings for ActionController::ParamsWrapper which +# is enabled by default. + +# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +ActiveSupport.on_load(:action_controller) do + wrap_parameters format: [:json] +end + +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/config/locales/en.yml b/config/locales/en.yml new file mode 100644 index 000000000..065395716 --- /dev/null +++ b/config/locales/en.yml @@ -0,0 +1,23 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t 'hello' +# +# In views, this is aliased to just `t`: +# +# <%= t('hello') %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# To learn more, please read the Rails Internationalization guide +# available at http://guides.rubyonrails.org/i18n.html. + +en: + hello: "Hello world" diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 000000000..c7f311f81 --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,47 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum, this matches the default thread size of Active Record. +# +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests, default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked webserver processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. If you use this option +# you need to make sure to reconnect any threads in the `on_worker_boot` +# block. +# +# preload_app! + +# The code in the `on_worker_boot` will be called if you are using +# clustered mode by specifying a number of `workers`. After each worker +# process is booted this block will be run, if you are using `preload_app!` +# option you will want to use this block to reconnect to any threads +# or connections that may have been created at application boot, Ruby +# cannot share connections between processes. +# +# on_worker_boot do +# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) +# end + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart diff --git a/config/routes.rb b/config/routes.rb new file mode 100644 index 000000000..c25149db8 --- /dev/null +++ b/config/routes.rb @@ -0,0 +1,7 @@ +Rails.application.routes.draw do + # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html + + get 'tasks', to: 'tasks#index' + + get 'tasks/:id', to: 'tasks#show', as: 'task' +end diff --git a/config/secrets.yml b/config/secrets.yml new file mode 100644 index 000000000..540ef2710 --- /dev/null +++ b/config/secrets.yml @@ -0,0 +1,22 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key is used for verifying the integrity of signed cookies. +# If you change this key, all old signed cookies will become invalid! + +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +# You can use `rails secret` to generate a secure secret key. + +# Make sure the secrets in this file are kept private +# if you're sharing your code publicly. + +development: + secret_key_base: 8823fdcdbf19d9f2459135c78b34945e9a461ef551f7c824190f992e6b81f9cff4929ef75e2e3d19d8c7b97b041e6b8bad89c4e883192f29aebd6ca3a2e7b415 + +test: + secret_key_base: 1ebce50759deb27bf1081dcc1a9dcf5ee872d9018b87999824b8c77ac29f06d376376634261455deca6fb8c97a3b6022e12f851d0a8da7ed44143648b6d6e451 + +# Do not keep production secrets in the repository, +# instead read values from the environment. +production: + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/config/spring.rb b/config/spring.rb new file mode 100644 index 000000000..c9119b40c --- /dev/null +++ b/config/spring.rb @@ -0,0 +1,6 @@ +%w( + .ruby-version + .rbenv-vars + tmp/restart.txt + tmp/caching-dev.txt +).each { |path| Spring.watch(path) } diff --git a/db/development.sqlite3 b/db/development.sqlite3 new file mode 100644 index 000000000..e69de29bb diff --git a/db/seeds.rb b/db/seeds.rb new file mode 100644 index 000000000..1beea2acc --- /dev/null +++ b/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). +# +# Examples: +# +# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) +# Character.create(name: 'Luke', movie: movies.first) diff --git a/lib/assets/.keep b/lib/assets/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/lib/tasks/.keep b/lib/tasks/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/log/.keep b/log/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/log/development.log b/log/development.log new file mode 100644 index 000000000..34cda9c14 --- /dev/null +++ b/log/development.log @@ -0,0 +1,754 @@ +Started GET "/" for ::1 at 2017-03-20 14:46:46 -0700 + +ArgumentError ('Tasks' is not a supported controller name. This can lead to potential routing problems. See http://guides.rubyonrails.org/routing.html#specifying-a-controller-to-use): + +config/routes.rb:4:in `block in ' +config/routes.rb:1:in `' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.0ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.7ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (81.2ms) +Started GET "/" for ::1 at 2017-03-20 14:50:16 -0700 +Processing by Rails::WelcomeController#index as HTML + Parameters: {"internal"=>true} + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb (2.9ms) +Completed 200 OK in 21ms (Views: 5.7ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 14:50:30 -0700 + +ActionController::RoutingError (uninitialized constant TasksController): + +activesupport (5.0.2) lib/active_support/inflector/methods.rb:268:in `const_get' +activesupport (5.0.2) lib/active_support/inflector/methods.rb:268:in `block in constantize' +activesupport (5.0.2) lib/active_support/inflector/methods.rb:266:in `each' +activesupport (5.0.2) lib/active_support/inflector/methods.rb:266:in `inject' +activesupport (5.0.2) lib/active_support/inflector/methods.rb:266:in `constantize' +actionpack (5.0.2) lib/action_dispatch/http/request.rb:81:in `controller_class' +actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:44:in `controller' +actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:30:in `serve' +actionpack (5.0.2) lib/action_dispatch/journey/router.rb:39:in `block in serve' +actionpack (5.0.2) lib/action_dispatch/journey/router.rb:26:in `each' +actionpack (5.0.2) lib/action_dispatch/journey/router.rb:26:in `serve' +actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:725:in `call' +rack (2.0.1) lib/rack/etag.rb:25:in `call' +rack (2.0.1) lib/rack/conditional_get.rb:25:in `call' +rack (2.0.1) lib/rack/head.rb:12:in `call' +rack (2.0.1) lib/rack/session/abstract/id.rb:222:in `context' +rack (2.0.1) lib/rack/session/abstract/id.rb:216:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/cookies.rb:613:in `call' +activerecord (5.0.2) lib/active_record/migration.rb:553:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call' +activesupport (5.0.2) lib/active_support/callbacks.rb:97:in `__run_callbacks__' +activesupport (5.0.2) lib/active_support/callbacks.rb:750:in `_run_call_callbacks' +activesupport (5.0.2) lib/active_support/callbacks.rb:90:in `run_callbacks' +actionpack (5.0.2) lib/action_dispatch/middleware/callbacks.rb:36:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [1 times] (1.4ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (10.9ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.2ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (110.8ms) +Started GET "/" for ::1 at 2017-03-20 14:52:05 -0700 +Processing by Rails::WelcomeController#index as HTML + Parameters: {"internal"=>true} + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb (2.4ms) +Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 14:52:36 -0700 + +ActionController::RoutingError (uninitialized constant TasksController): + +activesupport (5.0.2) lib/active_support/inflector/methods.rb:268:in `const_get' +activesupport (5.0.2) lib/active_support/inflector/methods.rb:268:in `block in constantize' +activesupport (5.0.2) lib/active_support/inflector/methods.rb:266:in `each' +activesupport (5.0.2) lib/active_support/inflector/methods.rb:266:in `inject' +activesupport (5.0.2) lib/active_support/inflector/methods.rb:266:in `constantize' +actionpack (5.0.2) lib/action_dispatch/http/request.rb:81:in `controller_class' +actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:44:in `controller' +actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:30:in `serve' +actionpack (5.0.2) lib/action_dispatch/journey/router.rb:39:in `block in serve' +actionpack (5.0.2) lib/action_dispatch/journey/router.rb:26:in `each' +actionpack (5.0.2) lib/action_dispatch/journey/router.rb:26:in `serve' +actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:725:in `call' +rack (2.0.1) lib/rack/etag.rb:25:in `call' +rack (2.0.1) lib/rack/conditional_get.rb:25:in `call' +rack (2.0.1) lib/rack/head.rb:12:in `call' +rack (2.0.1) lib/rack/session/abstract/id.rb:222:in `context' +rack (2.0.1) lib/rack/session/abstract/id.rb:216:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/cookies.rb:613:in `call' +activerecord (5.0.2) lib/active_record/migration.rb:553:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call' +activesupport (5.0.2) lib/active_support/callbacks.rb:97:in `__run_callbacks__' +activesupport (5.0.2) lib/active_support/callbacks.rb:750:in `_run_call_callbacks' +activesupport (5.0.2) lib/active_support/callbacks.rb:90:in `run_callbacks' +actionpack (5.0.2) lib/action_dispatch/middleware/callbacks.rb:36:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.6ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [1 times] (1.1ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (91.7ms) +Started GET "/tasks" for ::1 at 2017-03-20 15:01:34 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.4ms) +Completed 200 OK in 358ms (Views: 355.7ms | ActiveRecord: 0.0ms) + + +Started GET "/" for ::1 at 2017-03-20 15:02:01 -0700 +Processing by Rails::WelcomeController#index as HTML + Parameters: {"internal"=>true} + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb (2.9ms) +Completed 200 OK in 15ms (Views: 5.4ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 15:02:07 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.6ms) +Completed 200 OK in 19ms (Views: 17.2ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 15:02:11 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.4ms) +Completed 200 OK in 19ms (Views: 17.2ms | ActiveRecord: 0.0ms) + + +Started GET "/task" for ::1 at 2017-03-20 15:02:16 -0700 + +ActionController::RoutingError (No route matches [GET] "/task"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.4ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [1 times] (2.3ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (2.4ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (97.8ms) +Started GET "/tasks" for ::1 at 2017-03-20 15:02:32 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.5ms) +Completed 200 OK in 20ms (Views: 17.8ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 15:02:36 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.6ms) +Completed 200 OK in 23ms (Views: 20.9ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 15:02:49 -0700 + +ActionController::RoutingError (No route matches [GET] "/tasks"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.4ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.2ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (71.5ms) +Started GET "/tasks" for ::1 at 2017-03-20 15:02:58 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.5ms) +Completed 200 OK in 22ms (Views: 18.8ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 15:03:07 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.5ms) +Completed 200 OK in 26ms (Views: 22.8ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 15:18:23 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.5ms) +Completed 200 OK in 24ms (Views: 22.1ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 15:24:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.4ms) +Completed 200 OK in 23ms (Views: 20.6ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 15:24:28 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.6ms) +Completed 200 OK in 23ms (Views: 20.7ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 15:25:08 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.5ms) +Completed 200 OK in 23ms (Views: 21.4ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 15:26:30 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.6ms) +Completed 200 OK in 22ms (Views: 20.1ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 15:26:39 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.5ms) +Completed 200 OK in 24ms (Views: 22.1ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:17:44 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (1.4ms) +Completed 200 OK in 188ms (Views: 177.2ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:17:54 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.9ms) +Completed 200 OK in 25ms (Views: 22.5ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:18:40 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.5ms) +Completed 200 OK in 40ms (Views: 37.6ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/create" for ::1 at 2017-03-20 16:18:46 -0700 +Processing by TasksController#show as HTML + Parameters: {"create"=>"create"} +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms) + + + +NoMethodError (undefined method `[]' for nil:NilClass): + +app/controllers/tasks_controller.rb:10:in `show' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (3.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (75.4ms) +Started GET "/books/0" for ::1 at 2017-03-20 16:19:06 -0700 + +ActionController::RoutingError (No route matches [GET] "/books/0"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.3ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [2 times] (1.6ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (8.8ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.0ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (99.3ms) +Started GET "/books" for ::1 at 2017-03-20 16:19:09 -0700 + +ActionController::RoutingError (No route matches [GET] "/books"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.6ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [2 times] (1.4ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.0ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (95.1ms) +Started GET "/tasks" for ::1 at 2017-03-20 16:22:54 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.7ms) +Completed 200 OK in 23ms (Views: 20.7ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/0" for ::1 at 2017-03-20 16:22:57 -0700 +Processing by TasksController#show as HTML + Parameters: {"create"=>"0"} +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms) + + + +NoMethodError (undefined method `[]' for nil:NilClass): + +app/controllers/tasks_controller.rb:10:in `show' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.9ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (75.4ms) +Started GET "/tasks/" for ::1 at 2017-03-20 16:24:33 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (1.3ms) +Completed 200 OK in 28ms (Views: 26.0ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/0" for ::1 at 2017-03-20 16:24:35 -0700 +Processing by TasksController#show as HTML + Parameters: {"create"=>"0"} +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms) + + + +NoMethodError (undefined method `[]' for nil:NilClass): + +app/controllers/tasks_controller.rb:10:in `show' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (5.0ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (75.1ms) +Started GET "/tasks/" for ::1 at 2017-03-20 16:27:41 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.7ms) +Completed 200 OK in 27ms (Views: 24.8ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/0" for ::1 at 2017-03-20 16:27:43 -0700 +Processing by TasksController#show as HTML + Parameters: {"create"=>"0"} + Rendering tasks/show.erb within layouts/application + Rendered tasks/show.erb within layouts/application (0.8ms) +Completed 200 OK in 30ms (Views: 20.7ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:27:45 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.9ms) +Completed 200 OK in 24ms (Views: 21.0ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/1" for ::1 at 2017-03-20 16:27:47 -0700 +Processing by TasksController#show as HTML + Parameters: {"create"=>"1"} + Rendering tasks/show.erb within layouts/application + Rendered tasks/show.erb within layouts/application (0.7ms) +Completed 200 OK in 24ms (Views: 21.8ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:27:49 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (1.1ms) +Completed 200 OK in 26ms (Views: 23.2ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/2" for ::1 at 2017-03-20 16:27:50 -0700 +Processing by TasksController#show as HTML + Parameters: {"create"=>"2"} + Rendering tasks/show.erb within layouts/application + Rendered tasks/show.erb within layouts/application (0.8ms) +Completed 200 OK in 27ms (Views: 23.6ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:27:56 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (1.0ms) +Completed 200 OK in 31ms (Views: 28.1ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/0" for ::1 at 2017-03-20 16:27:57 -0700 +Processing by TasksController#show as HTML + Parameters: {"create"=>"0"} + Rendering tasks/show.erb within layouts/application + Rendered tasks/show.erb within layouts/application (0.6ms) +Completed 200 OK in 26ms (Views: 23.0ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:27:58 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (1.0ms) +Completed 200 OK in 33ms (Views: 29.0ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:30:59 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.7ms) +Completed 200 OK in 19ms (Views: 16.7ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/0" for ::1 at 2017-03-20 16:31:02 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"0"} + Rendering tasks/show.erb within layouts/application + Rendered tasks/show.erb within layouts/application (0.6ms) +Completed 200 OK in 23ms (Views: 20.4ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:31:04 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.9ms) +Completed 200 OK in 26ms (Views: 23.8ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/1" for ::1 at 2017-03-20 16:31:04 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Rendering tasks/show.erb within layouts/application + Rendered tasks/show.erb within layouts/application (0.5ms) +Completed 200 OK in 22ms (Views: 19.8ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:31:06 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (1.1ms) +Completed 200 OK in 32ms (Views: 28.9ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/2" for ::1 at 2017-03-20 16:31:07 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Rendering tasks/show.erb within layouts/application + Rendered tasks/show.erb within layouts/application (0.9ms) +Completed 200 OK in 26ms (Views: 23.1ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:31:08 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.7ms) +Completed 200 OK in 27ms (Views: 22.9ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:33:45 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.6ms) +Completed 200 OK in 27ms (Views: 25.0ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:34:19 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.7ms) +Completed 200 OK in 21ms (Views: 18.1ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:38:37 -0700 + +ActionController::RoutingError (undefined local variable or method `random_time' for TasksController:Class): + +app/controllers/tasks_controller.rb:3:in `' +app/controllers/tasks_controller.rb:1:in `' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.4ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [2 times] (1.4ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.2ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (100.6ms) +Started GET "/tasks" for ::1 at 2017-03-20 16:45:33 -0700 + +ActionController::RoutingError (undefined local variable or method `random_time' for TasksController:Class): + +app/controllers/tasks_controller.rb:3:in `' +app/controllers/tasks_controller.rb:1:in `' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.0ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [2 times] (1.3ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.3ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (91.3ms) +Started GET "/tasks" for ::1 at 2017-03-20 16:46:39 -0700 + +ActionController::RoutingError (undefined local variable or method `random_time' for TasksController:Class): + +app/controllers/tasks_controller.rb:8:in `' +app/controllers/tasks_controller.rb:1:in `' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [2 times] (1.6ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.4ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (2.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (96.9ms) +Started GET "/tasks" for ::1 at 2017-03-20 16:46:53 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (1.1ms) +Completed 200 OK in 39ms (Views: 30.3ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/0" for ::1 at 2017-03-20 16:48:13 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"0"} + Rendering tasks/show.erb within layouts/application + Rendered tasks/show.erb within layouts/application (7.4ms) +Completed 200 OK in 31ms (Views: 27.8ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:48:15 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (1.2ms) +Completed 200 OK in 30ms (Views: 27.0ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/8" for ::1 at 2017-03-20 16:48:15 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"8"} + Rendering tasks/show.erb within layouts/application + Rendered tasks/show.erb within layouts/application (0.7ms) +Completed 200 OK in 24ms (Views: 21.6ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-20 16:48:16 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (1.0ms) +Completed 200 OK in 25ms (Views: 22.1ms | ActiveRecord: 0.0ms) + + +Started GET "/" for ::1 at 2017-03-21 19:26:43 -0700 +Processing by Rails::WelcomeController#index as HTML + Parameters: {"internal"=>true} + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb (4.0ms) +Completed 200 OK in 27ms (Views: 12.0ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-21 19:26:53 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (5.1ms) +Completed 200 OK in 200ms (Views: 197.4ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/0" for ::1 at 2017-03-21 19:26:55 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"0"} + Rendering tasks/show.erb within layouts/application + Rendered tasks/show.erb within layouts/application (0.9ms) +Completed 200 OK in 31ms (Views: 21.9ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-21 19:26:57 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (1.1ms) +Completed 200 OK in 34ms (Views: 29.6ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/0" for ::1 at 2017-03-21 19:26:59 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"0"} + Rendering tasks/show.erb within layouts/application + Rendered tasks/show.erb within layouts/application (1.1ms) +Completed 200 OK in 37ms (Views: 34.5ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-21 19:27:04 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (2.5ms) +Completed 200 OK in 46ms (Views: 41.5ms | ActiveRecord: 0.0ms) + + diff --git a/public/404.html b/public/404.html new file mode 100644 index 000000000..b612547fc --- /dev/null +++ b/public/404.html @@ -0,0 +1,67 @@ + + + + The page you were looking for doesn't exist (404) + + + + + + +
+
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/public/422.html b/public/422.html new file mode 100644 index 000000000..a21f82b3b --- /dev/null +++ b/public/422.html @@ -0,0 +1,67 @@ + + + + The change you wanted was rejected (422) + + + + + + +
+
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/public/500.html b/public/500.html new file mode 100644 index 000000000..061abc587 --- /dev/null +++ b/public/500.html @@ -0,0 +1,66 @@ + + + + We're sorry, but something went wrong (500) + + + + + + +
+
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/public/apple-touch-icon-precomposed.png b/public/apple-touch-icon-precomposed.png new file mode 100644 index 000000000..e69de29bb diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png new file mode 100644 index 000000000..e69de29bb diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 000000000..e69de29bb diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 000000000..3c9c7c01f --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,5 @@ +# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file +# +# To ban all spiders from the entire site uncomment the next two lines: +# User-agent: * +# Disallow: / diff --git a/test/controllers/.keep b/test/controllers/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/fixtures/.keep b/test/fixtures/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/fixtures/files/.keep b/test/fixtures/files/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/helpers/.keep b/test/helpers/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration/.keep b/test/integration/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/mailers/.keep b/test/mailers/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/models/.keep b/test/models/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/test_helper.rb b/test/test_helper.rb new file mode 100644 index 000000000..92e39b2d7 --- /dev/null +++ b/test/test_helper.rb @@ -0,0 +1,10 @@ +ENV['RAILS_ENV'] ||= 'test' +require File.expand_path('../../config/environment', __FILE__) +require 'rails/test_help' + +class ActiveSupport::TestCase + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + + # Add more helper methods to be used by all tests here... +end diff --git a/vendor/assets/javascripts/.keep b/vendor/assets/javascripts/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/assets/stylesheets/.keep b/vendor/assets/stylesheets/.keep new file mode 100644 index 000000000..e69de29bb From 9d49f6e7961877a37f0b6087b37a44da5f4ab905 Mon Sep 17 00:00:00 2001 From: laura Date: Tue, 21 Mar 2017 20:33:19 -0700 Subject: [PATCH 02/17] generated model task --- app/models/task.rb | 2 ++ db/migrate/20170322032729_create_tasks.rb | 11 +++++++++++ log/development.log | 23 +++++++++++++++++++++++ test/fixtures/tasks.yml | 11 +++++++++++ test/models/task_test.rb | 7 +++++++ 5 files changed, 54 insertions(+) create mode 100644 app/models/task.rb create mode 100644 db/migrate/20170322032729_create_tasks.rb create mode 100644 test/fixtures/tasks.yml create mode 100644 test/models/task_test.rb diff --git a/app/models/task.rb b/app/models/task.rb new file mode 100644 index 000000000..3c2342421 --- /dev/null +++ b/app/models/task.rb @@ -0,0 +1,2 @@ +class Task < ApplicationRecord +end diff --git a/db/migrate/20170322032729_create_tasks.rb b/db/migrate/20170322032729_create_tasks.rb new file mode 100644 index 000000000..eda5c5f18 --- /dev/null +++ b/db/migrate/20170322032729_create_tasks.rb @@ -0,0 +1,11 @@ +class CreateTasks < ActiveRecord::Migration[5.0] + def change + create_table :tasks do |t| + t.string :name + t.string :description + t.datetime :completed_at + + t.timestamps + end + end +end diff --git a/log/development.log b/log/development.log index 34cda9c14..947adf2a5 100644 --- a/log/development.log +++ b/log/development.log @@ -752,3 +752,26 @@ Processing by TasksController#index as HTML Completed 200 OK in 46ms (Views: 41.5ms | ActiveRecord: 0.0ms) +Started GET "/" for ::1 at 2017-03-21 20:12:38 -0700 +Processing by Rails::WelcomeController#index as HTML + Parameters: {"internal"=>true} + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb (3.9ms) +Completed 200 OK in 21ms (Views: 9.1ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-21 20:13:35 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (5.1ms) +Completed 200 OK in 174ms (Views: 171.0ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/0" for ::1 at 2017-03-21 20:13:36 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"0"} + Rendering tasks/show.erb within layouts/application + Rendered tasks/show.erb within layouts/application (0.8ms) +Completed 200 OK in 24ms (Views: 21.0ms | ActiveRecord: 0.0ms) + + diff --git a/test/fixtures/tasks.yml b/test/fixtures/tasks.yml new file mode 100644 index 000000000..25df85b7f --- /dev/null +++ b/test/fixtures/tasks.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + description: MyString + comple: 2017-03-21 20:27:29 + +two: + name: MyString + description: MyString + comple: 2017-03-21 20:27:29 diff --git a/test/models/task_test.rb b/test/models/task_test.rb new file mode 100644 index 000000000..3ca215970 --- /dev/null +++ b/test/models/task_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TaskTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end From ac29cbbd7d228d2c7db6d5882c22320b4537e4ce Mon Sep 17 00:00:00 2001 From: laura Date: Tue, 21 Mar 2017 20:35:52 -0700 Subject: [PATCH 03/17] Created tasks table using db:migate --- db/development.sqlite3 | Bin 0 -> 28672 bytes db/schema.rb | 23 +++++++++++++++++++++++ log/development.log | 14 ++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 db/schema.rb diff --git a/db/development.sqlite3 b/db/development.sqlite3 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..cc7e872e42f9c11e4d6666e19fa4bb8cffe55f21 100644 GIT binary patch literal 28672 zcmeI)O;6h}7zc2NmUc{ouv4_tyl|lcMw_-mu)~&35kf14b>)DjDKd#SBJxraw_?X` zABfYw)+Tn^WzwATqNcRFph>9uTXh>hj#EEBw+A;;-@j{kg40h?956wvWRWNec||E9 zBrj`G*6Wg!2WjlODAx!7c+HcwKb?8?Hz_>&Nz@nW_l0K*zvfNZK!E@RAOHafKmY;| zfB*y_@P7sN3k7XuML87g$mhwaFZVun!cV(AbVi%SH!aI-TeNMyZdi2W+~tr3d{vGt z^*_!QHBD2#JsDh6u;e5eJQXtI^+8Oh%ev?4bf?+2wyhT3Z|&@wtwZ|OI;7@7dvB*H z2klzTHf`?7deCUBQaybuo%UGl9J5%qU7k3x*AZS64u_p6==fZ4*JeVeE)!gMa*kAY zVlErm@bLA!o%G}h{iS|0SJdit`nuA8dih~; zj(NcB!22AtbZL@gG%%ATxz(R~^mv>Muj^Qok~ve*4%R27aO=W$JK6xC=h@E1Rwwb2tWV=5P$##AOHafOohOrGE*|jm5p-MFl5~@HXq8ou>YTm#YGYj zfB*y_009U<00Izz00bZafh&Q>xzb#A|9^S^|D34jK!N}SAOHafKmY;|fB*y_009U< z;GPKVDYHvUrpd#e7e`^hL*eos_oGgFnC|S?%GEW)pyldTwYF8RJg=4OHDhyf&*lC9 z3!+}!lMFEp2tWV=5P$##AOHafKmY;|fB*#UF0hbWnj8B0Aie)D|MU+90uX=z1Rwwb t2tWV=5P$##AOL|W7Qp_0iWe8DK>z{}fB*y_009U<00Izz00gcC{sLBYI;#Kx literal 0 HcmV?d00001 diff --git a/db/schema.rb b/db/schema.rb new file mode 100644 index 000000000..668260962 --- /dev/null +++ b/db/schema.rb @@ -0,0 +1,23 @@ +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 20170322032729) do + + create_table "tasks", force: :cascade do |t| + t.string "name" + t.string "description" + t.datetime "completed_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + +end diff --git a/log/development.log b/log/development.log index 947adf2a5..f15644a89 100644 --- a/log/development.log +++ b/log/development.log @@ -775,3 +775,17 @@ Processing by TasksController#show as HTML Completed 200 OK in 24ms (Views: 21.0ms | ActiveRecord: 0.0ms) +  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) +  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to CreateTasks (20170322032729) +  (0.1ms) begin transaction +  (0.6ms) CREATE TABLE "tasks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "description" varchar, "completed_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) + SQL (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170322032729"]] +  (0.8ms) commit transaction + ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", 2017-03-22 03:34:01 UTC], ["updated_at", 2017-03-22 03:34:01 UTC]] +  (0.7ms) commit transaction + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" From a8023d80390e73dde9b8464f7c96755692e6107a Mon Sep 17 00:00:00 2001 From: laura Date: Tue, 21 Mar 2017 20:45:03 -0700 Subject: [PATCH 04/17] generate migration to the rename last column --- db/migrate/20170322032729_create_tasks.rb | 2 +- db/migrate/20170322034128_changing_name_last_column.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20170322034128_changing_name_last_column.rb diff --git a/db/migrate/20170322032729_create_tasks.rb b/db/migrate/20170322032729_create_tasks.rb index eda5c5f18..3021b0dd0 100644 --- a/db/migrate/20170322032729_create_tasks.rb +++ b/db/migrate/20170322032729_create_tasks.rb @@ -3,7 +3,7 @@ def change create_table :tasks do |t| t.string :name t.string :description - t.datetime :completed_at + t.datetime :comple t.timestamps end diff --git a/db/migrate/20170322034128_changing_name_last_column.rb b/db/migrate/20170322034128_changing_name_last_column.rb new file mode 100644 index 000000000..c51f37f5f --- /dev/null +++ b/db/migrate/20170322034128_changing_name_last_column.rb @@ -0,0 +1,5 @@ +class ChangingNameLastColumn < ActiveRecord::Migration[5.0] + def change + rename_column(tasks, comple, completed_at) + end +end From 4b038fd9fceed030fd60e230f780b6d521384cd3 Mon Sep 17 00:00:00 2001 From: laura Date: Tue, 21 Mar 2017 21:40:13 -0700 Subject: [PATCH 05/17] Created two new instances of Task class --- db/development.sqlite3 | Bin 28672 -> 28672 bytes db/migrate/20170322032729_create_tasks.rb | 2 +- ...0170322034128_changing_name_last_column.rb | 2 +- db/schema.rb | 2 +- log/development.log | 45 ++++++++++++++++++ 5 files changed, 48 insertions(+), 3 deletions(-) diff --git a/db/development.sqlite3 b/db/development.sqlite3 index cc7e872e42f9c11e4d6666e19fa4bb8cffe55f21..7196760feea52d9ad0357a56daf95c3f577103ad 100644 GIT binary patch delta 345 zcmZp8z}WDBae}lUI|Bm)2*UvDL>*&B_K681EIjXd9XAUKl=Dn}&lAGPzS)KM022oj z{~ZSYcl>vN5*PS|1elmKjSLLU4UCP942(?-jVva=lNSRjx(!lv8>r|!zpxOqCL^jM zrp@p4#T02A(ls#FH8N5#FtIYWv@$Z+GcvX?FaWv$my91HJAQA}qX)JnuIP3Y7Cqe$Nxa$hz5u_W%#c{ae^2dFUU+d7XUS+9+m(A diff --git a/db/migrate/20170322032729_create_tasks.rb b/db/migrate/20170322032729_create_tasks.rb index 3021b0dd0..eda5c5f18 100644 --- a/db/migrate/20170322032729_create_tasks.rb +++ b/db/migrate/20170322032729_create_tasks.rb @@ -3,7 +3,7 @@ def change create_table :tasks do |t| t.string :name t.string :description - t.datetime :comple + t.datetime :completed_at t.timestamps end diff --git a/db/migrate/20170322034128_changing_name_last_column.rb b/db/migrate/20170322034128_changing_name_last_column.rb index c51f37f5f..55c15fcd1 100644 --- a/db/migrate/20170322034128_changing_name_last_column.rb +++ b/db/migrate/20170322034128_changing_name_last_column.rb @@ -1,5 +1,5 @@ class ChangingNameLastColumn < ActiveRecord::Migration[5.0] def change - rename_column(tasks, comple, completed_at) + rename_column :tasks, :completed_at, :completed_at end end diff --git a/db/schema.rb b/db/schema.rb index 668260962..2bf577d74 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170322032729) do +ActiveRecord::Schema.define(version: 20170322034128) do create_table "tasks", force: :cascade do |t| t.string "name" diff --git a/log/development.log b/log/development.log index f15644a89..a7a15a424 100644 --- a/log/development.log +++ b/log/development.log @@ -789,3 +789,48 @@ Migrating to CreateTasks (20170322032729)  (0.7ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to ChangingNameLastColumn (20170322034128) +  (0.1ms) begin transaction +  (0.0ms) rollback transaction + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to ChangingNameLastColumn (20170322034128) +  (0.1ms) begin transaction +  (0.0ms) rollback transaction + ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to ChangingNameLastColumn (20170322034128) +  (0.1ms) begin transaction +  (0.0ms) rollback transaction +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to ChangingNameLastColumn (20170322034128) +  (0.1ms) begin transaction +  (0.0ms) rollback transaction + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to ChangingNameLastColumn (20170322034128) +  (0.1ms) begin transaction +  (0.0ms) rollback transaction + ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to ChangingNameLastColumn (20170322034128) +  (0.1ms) begin transaction +  (0.3ms) CREATE TEMPORARY TABLE "atasks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "description" varchar, "completed_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) +  (0.1ms) INSERT INTO "atasks" ("id","name","description","completed_at","created_at","updated_at") + SELECT "id","name","description","completed_at","created_at","updated_at" FROM "tasks" +  (0.3ms) DROP TABLE "tasks" +  (0.1ms) CREATE TABLE "tasks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "description" varchar, "completed_at" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) +  (0.1ms) INSERT INTO "tasks" ("id","name","description","completed_at","created_at","updated_at") + SELECT "id","name","description","completed_at","created_at","updated_at" FROM "atasks" +  (0.1ms) DROP TABLE "atasks" + SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170322034128"]] +  (6.8ms) commit transaction + ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.0ms) commit transaction + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.1ms) begin transaction + SQL (0.5ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "The First Task"], ["description", "Chill"], ["created_at", 2017-03-22 04:39:24 UTC], ["updated_at", 2017-03-22 04:39:24 UTC]] +  (6.9ms) commit transaction +  (0.1ms) begin transaction + SQL (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Go to Brunch"], ["description", "Eat lots of Arepas"], ["created_at", 2017-03-22 04:39:27 UTC], ["updated_at", 2017-03-22 04:39:27 UTC]] +  (6.9ms) commit transaction From 6b9bbd918f80eebac3bdbb911857ac2a53abd614 Mon Sep 17 00:00:00 2001 From: laura Date: Tue, 21 Mar 2017 22:57:20 -0700 Subject: [PATCH 06/17] modified MVC to work with the model fields --- app/controllers/tasks_controller.rb | 33 +- app/views/tasks/index.html.erb | 4 +- app/views/tasks/{show.erb => show.html.erb} | 0 db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 501 ++++++++++++++++++++ 5 files changed, 521 insertions(+), 17 deletions(-) rename app/views/tasks/{show.erb => show.html.erb} (100%) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 80f751adb..3ce9d9b90 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -3,27 +3,30 @@ class TasksController < ApplicationController def self.random_time Time.at(rand * Time.now.to_i) end - - TASKS = [ - { name: "The First Task", description: "", completed_at: random_time }, - { name: "Go to Brunch", description: "" }, - { name: "Go to Lunch", description: "", completed_at: random_time }, - { name: "Go to Second Lunch", description: "" }, - { name: "Play Video Games", description: "", completed_at: random_time }, - { name: "High Five Somebody You Don't Know", description: "", completed_at: random_time }, - { name: "Plant Flowers", description: "", completed_at: random_time }, - { name: "Call Mom", description: "" }, - { name: "She worries, you know.", description: "" }, - { name: "Nap.", description: "", completed_at: random_time } - ] + # + # TASKS = [ + # { name: "The First Task", description: "", completed_at: random_time }, + # { name: "Go to Brunch", description: "" }, + # { name: "Go to Lunch", description: "", completed_at: random_time }, + # { name: "Go to Second Lunch", description: "" }, + # { name: "Play Video Games", description: "", completed_at: random_time }, + # { name: "High Five Somebody You Don't Know", description: "", completed_at: random_time }, + # { name: "Plant Flowers", description: "", completed_at: random_time }, + # { name: "Call Mom", description: "" }, + # { name: "She worries, you know.", description: "" }, + # { name: "Nap.", description: "", completed_at: random_time } + # ] def index - @taskslist = TASKS + @tasks = Task.all end def show + # id = Task.find(:id).to_i id = params[:id].to_i - @task = TASKS[id] + + @task = Task.find(id) + # @task = TASKS[id] end end diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index f4b7ce406..cb38f03cb 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -1,9 +1,9 @@

Tasks

    - <% @taskslist.each_with_index do |task, id| %> + <% @tasks.each_with_index do |task, index| %>
  • - <%= link_to task[:name], task_path(id) %> + <%= link_to task[:name], task_path(index+1) %>
  • <% end %>
diff --git a/app/views/tasks/show.erb b/app/views/tasks/show.html.erb similarity index 100% rename from app/views/tasks/show.erb rename to app/views/tasks/show.html.erb diff --git a/db/development.sqlite3 b/db/development.sqlite3 index 7196760feea52d9ad0357a56daf95c3f577103ad..0742a916bb6c1771263a48cfc8626d9c6d602c3f 100644 GIT binary patch delta 823 zcmZ{h%We}f6ox0|G7u#V8ziJs=~NXeNMtm2#&u?PRobQ~K!K=;3JK~oR>!Kxj%GZB zh{cpQfE6#$9UCehhfR4CTrMFU=*o*v{{D0Rb97ocI<0(Is5Cy_?o=8ld&k?isx{^` zzBG0kbMv3)U)8_YKh;U?TaBH(->4ODtFCjiaMsoyvys=AoR1(^Mo5_GJcR+5asq?g z7@a_7m>On~kCyIswA9H!Fa=^LbaD^-h&KIJ6Jzj6gu=)tUP#->4=yGzuDecHEZFFN z%weq4RPgNnSuPwZJ@y{_e3nWA8WH6A7=?a#G1|Ayov}jl9YA_o5 zd|#^}Jj~U8yul1eo|Uu(YDL8N0!-T&m%KCN=_S`$UY>fV!k9B@;>qmCAPPtnw7oVC W(D~ZWlifMjxr4sGe0_YQQvCsSOwon_ delta 40 wcmZp8z}WDBae_1>`$QRMM)r*fOZ+*Q_(K`^H}HpU78LO0-y9mhN`R3G0Q~O@Qvd(} diff --git a/log/development.log b/log/development.log index a7a15a424..a077d9bf8 100644 --- a/log/development.log +++ b/log/development.log @@ -834,3 +834,504 @@ Migrating to ChangingNameLastColumn (20170322034128)  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Go to Brunch"], ["description", "Eat lots of Arepas"], ["created_at", 2017-03-22 04:39:27 UTC], ["updated_at", 2017-03-22 04:39:27 UTC]]  (6.9ms) commit transaction + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" +  (0.1ms) begin transaction + SQL (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Go to Lunch"], ["description", "Eat healthy"], ["created_at", 2017-03-22 04:45:48 UTC], ["updated_at", 2017-03-22 04:45:48 UTC]] +  (1.0ms) commit transaction + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" +  (0.2ms) SELECT COUNT(*) FROM "tasks" + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT ? [["LIMIT", 1]] + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT ? [["LIMIT", 1]] + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT ? [["LIMIT", 1]] + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT ? [["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.1ms) commit transaction + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = ? LIMIT ? [["name", "The First Task"], ["LIMIT", 1]] + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = ? LIMIT ? [["name", "The First Task"], ["LIMIT", 1]] + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."name" = ? [["name", "Go to Lunch"]] +  (0.1ms) begin transaction + SQL (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Go to Second Lunch"], ["description", "Eat less"], ["created_at", 2017-03-22 05:13:50 UTC], ["updated_at", 2017-03-22 05:13:50 UTC]] +  (1.8ms) commit transaction +  (0.1ms) begin transaction + SQL (0.3ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Play Video Games"], ["description", ""], ["created_at", 2017-03-22 05:14:28 UTC], ["updated_at", 2017-03-22 05:14:28 UTC]] +  (0.8ms) commit transaction +  (0.1ms) begin transaction + SQL (0.9ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "High Five Somebody You Don't Know"], ["description", "Randomly walking on the streets"], ["created_at", 2017-03-22 05:15:28 UTC], ["updated_at", 2017-03-22 05:15:28 UTC]] +  (0.9ms) commit transaction +  (0.1ms) begin transaction + SQL (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Plant Flowers"], ["description", ""], ["created_at", 2017-03-22 05:16:14 UTC], ["updated_at", 2017-03-22 05:16:14 UTC]] +  (6.8ms) commit transaction +  (0.1ms) begin transaction + SQL (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Call Mom"], ["description", "Dial her number in your phone"], ["created_at", 2017-03-22 05:17:22 UTC], ["updated_at", 2017-03-22 05:17:22 UTC]] +  (8.0ms) commit transaction +  (0.1ms) begin transaction + SQL (1.9ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "She worries, you know."], ["description", "I know!"], ["created_at", 2017-03-22 05:17:51 UTC], ["updated_at", 2017-03-22 05:17:51 UTC]] +  (6.8ms) commit transaction +  (0.1ms) begin transaction + SQL (0.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Nap."], ["description", "Sleep until your belly buttom stands up!(Colombian idiom)"], ["created_at", 2017-03-22 05:19:05 UTC], ["updated_at", 2017-03-22 05:19:05 UTC]] +  (7.2ms) commit transaction + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" +  (0.2ms) SELECT COUNT(*) FROM "tasks" +Started GET "/tasks" for ::1 at 2017-03-21 22:30:00 -0700 + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application +Started GET "/tasks" for ::1 at 2017-03-21 22:30:00 -0700 + Rendered tasks/index.html.erb within layouts/application (10.3ms) +Completed 500 Internal Server Error in 24ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (undefined method `each_with_index' for nil:NilClass): + 1:

Tasks

+ 2: + 3:
    + 4: <% @taskslist.each_with_index do |task, id| %> + 5:
  • + 6: <%= link_to task[:name], task_path(id) %> + 7:
  • + +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb__117284107740776051_70329208471820' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (5.8ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (79.1ms) +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (3.6ms) +Completed 500 Internal Server Error in 13ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (undefined method `each_with_index' for nil:NilClass): + 1:

    Tasks

    + 2: + 3:
      + 4: <% @taskslist.each_with_index do |task, id| %> + 5:
    • + 6: <%= link_to task[:name], task_path(id) %> + 7:
    • + +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb__117284107740776051_70329250227340' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (5.0ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.6ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (71.9ms) +Started GET "/tasks" for ::1 at 2017-03-21 22:31:19 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (10.1ms) +Completed 200 OK in 42ms (Views: 38.3ms | ActiveRecord: 0.9ms) + + +Started GET "/tasks/0" for ::1 at 2017-03-21 22:31:21 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"0"} +Completed 500 Internal Server Error in 5ms (ActiveRecord: 0.0ms) + + + +NoMethodError (undefined method `id' for # +Did you mean? ids): + +app/controllers/tasks_controller.rb:26:in `show' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (5.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.7ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (72.5ms) +Started GET "/tasks/0" for ::1 at 2017-03-21 22:35:39 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"0"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", nil], ["LIMIT", 1]] +Completed 404 Not Found in 9ms (ActiveRecord: 0.9ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=id): + +app/controllers/tasks_controller.rb:25:in `show' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (9.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (81.7ms) +Started GET "/tasks/0" for ::1 at 2017-03-21 22:36:24 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"0"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", nil], ["LIMIT", 1]] +Completed 404 Not Found in 7ms (ActiveRecord: 0.8ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=id): + +app/controllers/tasks_controller.rb:28:in `show' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.0ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (73.8ms) +Started GET "/tasks/" for ::1 at 2017-03-21 22:37:16 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (6.6ms) +Completed 200 OK in 32ms (Views: 29.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/8" for ::1 at 2017-03-21 22:37:17 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"8"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", nil], ["LIMIT", 1]] +Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=id): + +app/controllers/tasks_controller.rb:28:in `show' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (3.9ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.0ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (73.0ms) +Started GET "/tasks" for ::1 at 2017-03-21 22:44:10 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (4.2ms) +Completed 500 Internal Server Error in 15ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (undefined method `each_with_index' for nil:NilClass): + 1:

      Tasks

      + 2: + 3:
        + 4: <% @tasks.each_with_index do |task, id| %> + 5:
      • + 6: <%= link_to task[:name], task_path(id) %> + 7:
      • + +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb__117284107740776051_70329218505620' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (6.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.3ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (79.5ms) +Started GET "/tasks" for ::1 at 2017-03-21 22:44:11 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (5.9ms) +Completed 500 Internal Server Error in 33ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (undefined method `each_with_index' for nil:NilClass): + 1:

        Tasks

        + 2: + 3:
          + 4: <% @tasks.each_with_index do |task, id| %> + 5:
        • + 6: <%= link_to task[:name], task_path(id) %> + 7:
        • + +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb__117284107740776051_70329212334520' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (6.0ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (6.0ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (83.0ms) +Started GET "/tasks" for ::1 at 2017-03-21 22:44:16 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (5.4ms) +Completed 500 Internal Server Error in 14ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (undefined method `each_with_index' for nil:NilClass): + 1:

          Tasks

          + 2: + 3:
            + 4: <% @tasks.each_with_index do |task, id| %> + 5:
          • + 6: <%= link_to task[:name], task_path(id) %> + 7:
          • + +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb__117284107740776051_70329221147140' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (10.4ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.6ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (79.4ms) +Started GET "/tasks" for ::1 at 2017-03-21 22:45:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (3.9ms) +Completed 500 Internal Server Error in 10ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (undefined method `each_with_index' for nil:NilClass): + 1:

            Tasks

            + 2: + 3:
              + 4: <% @tasks.each_with_index do |task, index| %> + 5:
            • + 6: <%= link_to task[:name], task_path(id) %> + 7:
            • + +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb__117284107740776051_70329264154320' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (6.0ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (81.3ms) +Started GET "/tasks" for ::1 at 2017-03-21 22:49:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (184.3ms) +Completed 500 Internal Server Error in 196ms (ActiveRecord: 0.8ms) + + + +ActionView::Template::Error (undefined local variable or method `id' for #<#:0x007fed98736d78>): + 3:
                + 4: <% @tasks.each_with_index do |task, index| %> + 5:
              • + 6: <%= link_to task[:name], task_path(id) %> + 7:
              • + 8: <% end %> + 9:
              + +app/views/tasks/index.html.erb:6:in `block in _app_views_tasks_index_html_erb__117284107740776051_70329220852060' +app/views/tasks/index.html.erb:4:in `each_with_index' +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb__117284107740776051_70329220852060' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (7.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (4.0ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (79.5ms) +Started GET "/tasks" for ::1 at 2017-03-21 22:49:32 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.0ms) +Completed 200 OK in 41ms (Views: 38.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/0" for ::1 at 2017-03-21 22:49:33 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"0"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 0], ["LIMIT", 1]] +Completed 404 Not Found in 3ms (ActiveRecord: 0.2ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=0): + +app/controllers/tasks_controller.rb:28:in `show' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (3.8ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (72.5ms) +Started GET "/tasks/1" for ::1 at 2017-03-21 22:51:25 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (13.9ms) +Completed 500 Internal Server Error in 22ms (ActiveRecord: 0.1ms) + + + +ActionView::Template::Error (undefined method `description' for #): + 1:

              Tasks#Show

              + 2:

              <%= Task.name %>

              + 3:

              Description: <%= Task.description %>

              + 4:

              Completed at: <%= Task.completed_at %>

              + 5: + 6: <%= link_to "back to tasks list", tasks_path %> + +app/views/tasks/show.html.erb:3:in `_app_views_tasks_show_html_erb__1879644844540223444_70329221669820' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (7.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (78.4ms) +Started GET "/tasks/1" for ::1 at 2017-03-21 22:53:19 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 33ms (Views: 30.3ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks" for ::1 at 2017-03-21 22:53:26 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.9ms) +Completed 200 OK in 21ms (Views: 19.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/0" for ::1 at 2017-03-21 22:53:28 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"0"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 0], ["LIMIT", 1]] +Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=0): + +app/controllers/tasks_controller.rb:28:in `show' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (3.4ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.6ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (68.2ms) +Started GET "/tasks" for ::1 at 2017-03-21 22:54:50 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 200 OK in 22ms (Views: 19.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for ::1 at 2017-03-21 22:54:52 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 32ms (Views: 27.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-21 22:54:54 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.7ms) +Completed 200 OK in 37ms (Views: 32.6ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/2" for ::1 at 2017-03-21 22:54:55 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 25ms (Views: 21.3ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks" for ::1 at 2017-03-21 22:54:56 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.9ms) +Completed 200 OK in 27ms (Views: 23.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/3" for ::1 at 2017-03-21 22:54:57 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"3"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 24ms (Views: 21.1ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks" for ::1 at 2017-03-21 22:54:58 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.9ms) +Completed 200 OK in 28ms (Views: 25.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/4" for ::1 at 2017-03-21 22:55:00 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"4"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 4], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.0ms) +Completed 200 OK in 27ms (Views: 22.2ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks" for ::1 at 2017-03-21 22:55:03 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.1ms) +Completed 200 OK in 29ms (Views: 26.6ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/6" for ::1 at 2017-03-21 22:55:06 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"6"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 6], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 33ms (Views: 29.6ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks" for ::1 at 2017-03-21 22:55:10 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 26ms (Views: 22.9ms | ActiveRecord: 0.2ms) + + From 9425134a37c9a63302b73ffd78d1345bc78483c4 Mon Sep 17 00:00:00 2001 From: laura Date: Wed, 22 Mar 2017 11:53:18 -0700 Subject: [PATCH 07/17] created a new page without template fo form yet --- app/controllers/tasks_controller.rb | 19 +--- app/views/tasks/index.html.erb | 1 + config/routes.rb | 2 + log/development.log | 133 ++++++++++++++++++++++++++++ 4 files changed, 139 insertions(+), 16 deletions(-) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 3ce9d9b90..ce15c57c3 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -3,30 +3,17 @@ class TasksController < ApplicationController def self.random_time Time.at(rand * Time.now.to_i) end - # - # TASKS = [ - # { name: "The First Task", description: "", completed_at: random_time }, - # { name: "Go to Brunch", description: "" }, - # { name: "Go to Lunch", description: "", completed_at: random_time }, - # { name: "Go to Second Lunch", description: "" }, - # { name: "Play Video Games", description: "", completed_at: random_time }, - # { name: "High Five Somebody You Don't Know", description: "", completed_at: random_time }, - # { name: "Plant Flowers", description: "", completed_at: random_time }, - # { name: "Call Mom", description: "" }, - # { name: "She worries, you know.", description: "" }, - # { name: "Nap.", description: "", completed_at: random_time } - # ] def index @tasks = Task.all end + def new + end + def show - # id = Task.find(:id).to_i id = params[:id].to_i - @task = Task.find(id) - # @task = TASKS[id] end end diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index cb38f03cb..92fd71e77 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -4,6 +4,7 @@ <% @tasks.each_with_index do |task, index| %>
            • <%= link_to task[:name], task_path(index+1) %> + <%= link_to "Add a new task", new_task_path %>
            • <% end %>
            diff --git a/config/routes.rb b/config/routes.rb index c25149db8..819159684 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,5 +3,7 @@ get 'tasks', to: 'tasks#index' + get 'tasks/new', to: 'tasks#new', as: 'new_task' + get 'tasks/:id', to: 'tasks#show', as: 'task' end diff --git a/log/development.log b/log/development.log index a077d9bf8..9d48e203e 100644 --- a/log/development.log +++ b/log/development.log @@ -1335,3 +1335,136 @@ Processing by TasksController#index as HTML Completed 200 OK in 26ms (Views: 22.9ms | ActiveRecord: 0.2ms) +Started GET "/" for ::1 at 2017-03-22 11:41:58 -0700 + ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" +Processing by Rails::WelcomeController#index as HTML + Parameters: {"internal"=>true} + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb (3.6ms) +Completed 200 OK in 24ms (Views: 9.5ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 11:42:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (12.0ms) +Completed 200 OK in 234ms (Views: 227.3ms | ActiveRecord: 1.3ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 11:50:33 -0700 + +SyntaxError (/Users/laurams/ada/rails/projects/TaskList/config/routes.rb:5: syntax error, unexpected tIDENTIFIER, expecting keyword_end + get 'tasks/new' to: 'tasks#new', as: 'new_task' + ^): + +config/routes.rb:5: syntax error, unexpected tIDENTIFIER, expecting keyword_end + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.7ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (85.6ms) +Started GET "/tasks" for ::1 at 2017-03-22 11:51:38 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.9ms) +Completed 200 OK in 37ms (Views: 30.0ms | ActiveRecord: 1.2ms) + + +Started GET "/tasks/new" for ::1 at 2017-03-22 11:51:47 -0700 +Processing by TasksController#new as HTML +Completed 406 Not Acceptable in 76ms (ActiveRecord: 0.0ms) + + + +ActionController::UnknownFormat (TasksController#new is missing a template for this request format and variant. + +request.formats: ["text/html"] +request.variant: [] + +NOTE! For XHR/Ajax or API requests, this action would normally respond with 204 No Content: an empty white screen. Since you're loading it in a web browser, we assume that you expected to actually render a template, not nothing, so we're showing an error to be extra-clear. If you expect 204 No Content, carry on. That's what you'll get from an XHR or API request. Give it a shot.): + +actionpack (5.0.2) lib/action_controller/metal/implicit_render.rb:56:in `default_render' +actionpack (5.0.2) lib/action_controller/metal/basic_implicit_render.rb:4:in `block in send_action' +actionpack (5.0.2) lib/action_controller/metal/basic_implicit_render.rb:4:in `tap' +actionpack (5.0.2) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action' +actionpack (5.0.2) lib/abstract_controller/base.rb:188:in `process_action' +actionpack (5.0.2) lib/action_controller/metal/rendering.rb:30:in `process_action' +actionpack (5.0.2) lib/abstract_controller/callbacks.rb:20:in `block in process_action' +activesupport (5.0.2) lib/active_support/callbacks.rb:126:in `call' +activesupport (5.0.2) lib/active_support/callbacks.rb:506:in `block (2 levels) in compile' +activesupport (5.0.2) lib/active_support/callbacks.rb:455:in `call' +activesupport (5.0.2) lib/active_support/callbacks.rb:101:in `__run_callbacks__' +activesupport (5.0.2) lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks' +activesupport (5.0.2) lib/active_support/callbacks.rb:90:in `run_callbacks' +actionpack (5.0.2) lib/abstract_controller/callbacks.rb:19:in `process_action' +actionpack (5.0.2) lib/action_controller/metal/rescue.rb:20:in `process_action' +actionpack (5.0.2) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action' +activesupport (5.0.2) lib/active_support/notifications.rb:164:in `block in instrument' +activesupport (5.0.2) lib/active_support/notifications/instrumenter.rb:21:in `instrument' +activesupport (5.0.2) lib/active_support/notifications.rb:164:in `instrument' +actionpack (5.0.2) lib/action_controller/metal/instrumentation.rb:30:in `process_action' +actionpack (5.0.2) lib/action_controller/metal/params_wrapper.rb:248:in `process_action' +activerecord (5.0.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action' +actionpack (5.0.2) lib/abstract_controller/base.rb:126:in `process' +actionview (5.0.2) lib/action_view/rendering.rb:30:in `process' +actionpack (5.0.2) lib/action_controller/metal.rb:190:in `dispatch' +actionpack (5.0.2) lib/action_controller/metal.rb:262:in `dispatch' +actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:50:in `dispatch' +actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:32:in `serve' +actionpack (5.0.2) lib/action_dispatch/journey/router.rb:39:in `block in serve' +actionpack (5.0.2) lib/action_dispatch/journey/router.rb:26:in `each' +actionpack (5.0.2) lib/action_dispatch/journey/router.rb:26:in `serve' +actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:725:in `call' +rack (2.0.1) lib/rack/etag.rb:25:in `call' +rack (2.0.1) lib/rack/conditional_get.rb:25:in `call' +rack (2.0.1) lib/rack/head.rb:12:in `call' +rack (2.0.1) lib/rack/session/abstract/id.rb:222:in `context' +rack (2.0.1) lib/rack/session/abstract/id.rb:216:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/cookies.rb:613:in `call' +activerecord (5.0.2) lib/active_record/migration.rb:553:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call' +activesupport (5.0.2) lib/active_support/callbacks.rb:97:in `__run_callbacks__' +activesupport (5.0.2) lib/active_support/callbacks.rb:750:in `_run_call_callbacks' +activesupport (5.0.2) lib/active_support/callbacks.rb:90:in `run_callbacks' +actionpack (5.0.2) lib/action_dispatch/middleware/callbacks.rb:36:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.7ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (70.6ms) From 15bf7389d5f1c48e419827ffff043a91fc14a859 Mon Sep 17 00:00:00 2001 From: laura Date: Wed, 22 Mar 2017 12:17:52 -0700 Subject: [PATCH 08/17] add tasks#create using form data --- app/controllers/tasks_controller.rb | 9 + app/views/tasks/index.html.erb | 6 +- app/views/tasks/new.html.erb | 12 ++ config/routes.rb | 4 +- log/development.log | 250 ++++++++++++++++++++++++++++ 5 files changed, 278 insertions(+), 3 deletions(-) create mode 100644 app/views/tasks/new.html.erb diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index ce15c57c3..3edc4a327 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -11,9 +11,18 @@ def index def new end + def create + puts ">>>>>>> LMS: In TasksController#create" + Task.create(task_params) + end + def show id = params[:id].to_i @task = Task.find(id) + end + private + def task_params + return params.require(:task).permit(:name, :description, :completed_at) end end diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index 92fd71e77..74a95267e 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -3,8 +3,10 @@
              <% @tasks.each_with_index do |task, index| %>
            • - <%= link_to task[:name], task_path(index+1) %> - <%= link_to "Add a new task", new_task_path %> + <%= link_to task[:name], tasks_path(index + 1) %>
            • + <% end %>
            + +<%= link_to "Add a new task", new_task_path %> diff --git a/app/views/tasks/new.html.erb b/app/views/tasks/new.html.erb new file mode 100644 index 000000000..ac9e1d6f4 --- /dev/null +++ b/app/views/tasks/new.html.erb @@ -0,0 +1,12 @@ +
            + + + + + + + + + + +
            diff --git a/config/routes.rb b/config/routes.rb index 819159684..09b0062c7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,9 +1,11 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html - get 'tasks', to: 'tasks#index' + get 'tasks', to: 'tasks#index', as: 'tasks' get 'tasks/new', to: 'tasks#new', as: 'new_task' + post 'tasks', to: 'tasks#create', as: 'tasks' + get 'tasks/:id', to: 'tasks#show', as: 'task' end diff --git a/log/development.log b/log/development.log index 9d48e203e..7f3035426 100644 --- a/log/development.log +++ b/log/development.log @@ -1468,3 +1468,253 @@ puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.7ms) Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (70.6ms) +Started GET "/tasks/" for ::1 at 2017-03-22 11:53:34 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.6ms) +Completed 200 OK in 25ms (Views: 23.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/10" for ::1 at 2017-03-22 12:03:03 -0700 + +ArgumentError (Invalid route name, already in use: 'tasks' +You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here: +http://guides.rubyonrails.org/routing.html#restricting-the-routes-created): + +config/routes.rb:8:in `block in ' +config/routes.rb:1:in `' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.8ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.7ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (78.9ms) +Started GET "/tasks/" for ::1 at 2017-03-22 12:03:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.8ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (146.3ms) +Completed 500 Internal Server Error in 163ms (ActiveRecord: 2.0ms) + + + +ActionView::Template::Error (undefined method `task_path' for #<#:0x007ffbd1858b88> +Did you mean? tasks_path): + 3:
              + 4: <% @tasks.each_with_index do |task, index| %> + 5:
            • + 6: <%= link_to task[:name], task_path(index+1) %> + 7: <%= link_to "Add a new task", new_task_path %> + 8:
            • + 9: <% end %> + +app/views/tasks/index.html.erb:6:in `block in _app_views_tasks_index_html_erb___377957607929338142_70359764371340' +app/views/tasks/index.html.erb:4:in `each_with_index' +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb___377957607929338142_70359764371340' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (6.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (8.0ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (86.2ms) +Started GET "/tasks/" for ::1 at 2017-03-22 12:09:37 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (103.6ms) +Completed 500 Internal Server Error in 111ms (ActiveRecord: 0.3ms) + + + +ActionView::Template::Error (undefined method `task_path' for #<#:0x007ffbce8174b0> +Did you mean? tasks_path): + 3:
                + 4: <% @tasks.each_with_index do |task, index| %> + 5:
              • + 6: <%= link_to task[:name], task_path(index+1) %> + 7: <%= link_to "Add a new task", new_task_path %> + 8:
              • + 9: <% end %> + +app/views/tasks/index.html.erb:6:in `block in _app_views_tasks_index_html_erb___377957607929338142_70359739055940' +app/views/tasks/index.html.erb:4:in `each_with_index' +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb___377957607929338142_70359739055940' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (7.8ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (82.4ms) +Started GET "/tasks" for ::1 at 2017-03-22 12:11:38 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (1.0ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (109.3ms) +Completed 500 Internal Server Error in 116ms (ActiveRecord: 1.0ms) + + + +ActionView::Template::Error (undefined method `task_path' for #<#:0x007ffbd209cb50> +Did you mean? tasks_path): + 3:
                  + 4: <% @tasks.each_with_index do |task, index| %> + 5:
                • + 6: <%= link_to task[:name], task_path(index + 1) %> + 7: <%= link_to "Add a new task", new_task_path %> + 8:
                • + 9: <% end %> +Started GET "/tasks" for ::1 at 2017-03-22 12:11:38 -0700 + +Processing by TasksController#index as HTML +app/views/tasks/index.html.erb:6:in `block in _app_views_tasks_index_html_erb___377957607929338142_70359768689300' +app/views/tasks/index.html.erb:4:in `each_with_index' +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb___377957607929338142_70359768689300' + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (100.4ms) +Completed 500 Internal Server Error in 202ms (ActiveRecord: 0.6ms) + + + +ActionView::Template::Error (undefined method `task_path' for #<#:0x007ffbca60dee8> +Did you mean? tasks_path): + 3:
                    + 4: <% @tasks.each_with_index do |task, index| %> + 5:
                  • + 6: <%= link_to task[:name], task_path(index + 1) %> + 7: <%= link_to "Add a new task", new_task_path %> + 8:
                  • + 9: <% end %> + +app/views/tasks/index.html.erb:6:in `block in _app_views_tasks_index_html_erb___377957607929338142_70359723412100' +app/views/tasks/index.html.erb:4:in `each_with_index' +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb___377957607929338142_70359723412100' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (11.5ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (5.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.1ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.9ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.0ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (140.7ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (162.6ms) +Started GET "/task" for ::1 at 2017-03-22 12:11:46 -0700 + +ActionController::RoutingError (No route matches [GET] "/task"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.3ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [2 times] (10.0ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (25.0ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.3ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (133.5ms) +Started GET "/tasks" for ::1 at 2017-03-22 12:11:58 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (92.5ms) +Completed 500 Internal Server Error in 99ms (ActiveRecord: 0.2ms) + + + +ActionView::Template::Error (undefined method `task_path' for #<#:0x007ffbcd5f9918> +Did you mean? tasks_path): + 3:
                      + 4: <% @tasks.each_with_index do |task, index| %> + 5:
                    • + 6: <%= link_to task[:name], task_path(index + 1) %> + 7: <%= link_to "Add a new task", new_task_path %> + 8:
                    • + 9: <% end %> + +app/views/tasks/index.html.erb:6:in `block in _app_views_tasks_index_html_erb___377957607929338142_70359729557880' +app/views/tasks/index.html.erb:4:in `each_with_index' +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb___377957607929338142_70359729557880' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (10.4ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (3.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (80.5ms) +Started GET "/tasks" for ::1 at 2017-03-22 12:13:00 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.0ms) +Completed 200 OK in 44ms (Views: 41.4ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for ::1 at 2017-03-22 12:13:07 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (0.5ms) +Completed 200 OK in 33ms (Views: 22.0ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 12:13:36 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.8ms) +Completed 200 OK in 23ms (Views: 20.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 12:14:32 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.4ms) +Completed 200 OK in 23ms (Views: 20.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for ::1 at 2017-03-22 12:14:35 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (0.6ms) +Completed 200 OK in 27ms (Views: 23.8ms | ActiveRecord: 0.0ms) + + From 0249c320ac6a74eb9077681e844c2bf763597fbb Mon Sep 17 00:00:00 2001 From: laura Date: Wed, 22 Mar 2017 13:40:59 -0700 Subject: [PATCH 09/17] edited new.html.erb error and added redirect in the 'create' action --- app/controllers/tasks_controller.rb | 2 + app/views/tasks/index.html.erb | 2 +- app/views/tasks/new.html.erb | 2 +- config/routes.rb | 4 +- db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 677 ++++++++++++++++++++++++++++ 6 files changed, 682 insertions(+), 5 deletions(-) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 3edc4a327..6b97735c6 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -14,6 +14,8 @@ def new def create puts ">>>>>>> LMS: In TasksController#create" Task.create(task_params) + + redirect_to tasks_path end def show diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index 74a95267e..69437fcb4 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -3,7 +3,7 @@
                        <% @tasks.each_with_index do |task, index| %>
                      • - <%= link_to task[:name], tasks_path(index + 1) %> + <%= link_to task.name, task_path(task.id) %>
                      • <% end %> diff --git a/app/views/tasks/new.html.erb b/app/views/tasks/new.html.erb index ac9e1d6f4..621b559d3 100644 --- a/app/views/tasks/new.html.erb +++ b/app/views/tasks/new.html.erb @@ -1,4 +1,4 @@ -
                        + diff --git a/config/routes.rb b/config/routes.rb index 09b0062c7..94711e978 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,10 +2,8 @@ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html get 'tasks', to: 'tasks#index', as: 'tasks' - get 'tasks/new', to: 'tasks#new', as: 'new_task' - - post 'tasks', to: 'tasks#create', as: 'tasks' + post 'tasks', to: 'tasks#create' get 'tasks/:id', to: 'tasks#show', as: 'task' end diff --git a/db/development.sqlite3 b/db/development.sqlite3 index 0742a916bb6c1771263a48cfc8626d9c6d602c3f..9b76420191e775b8d32cdb0542770e329a666977 100644 GIT binary patch delta 185 zcmZp8z}WDBae_3Xz(g5mMuCk9OZ=s{xt}rcZ{QE*XX0DU7svaMcRH^r&uyMW?q?et zPjJ^)aTBI_IP&<|&kCWR|2R|3n#QM*fWnOZ+9ccoG@-H}Hq@Gx4qFi{pLBJDt~*=QdB`#zt43 L&51Gdgc-R2&*u<9 diff --git a/log/development.log b/log/development.log index 7f3035426..386fb26b2 100644 --- a/log/development.log +++ b/log/development.log @@ -1718,3 +1718,680 @@ Processing by TasksController#new as HTML Completed 200 OK in 27ms (Views: 23.8ms | ActiveRecord: 0.0ms) +Started GET "/tasks/new" for ::1 at 2017-03-22 12:19:17 -0700 + +ArgumentError (Invalid route name, already in use: 'tasks' +You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here: +http://guides.rubyonrails.org/routing.html#restricting-the-routes-created): + +config/routes.rb:8:in `block in ' +config/routes.rb:1:in `' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.8ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (75.3ms) +Started GET "/tasks/new" for ::1 at 2017-03-22 12:20:02 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (0.5ms) +Completed 200 OK in 23ms (Views: 21.2ms | ActiveRecord: 0.0ms) + + +Started POST "/Tasks" for ::1 at 2017-03-22 12:20:44 -0700 + +ActionController::RoutingError (No route matches [POST] "/Tasks"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.3ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (1.7ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.4ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (94.1ms) +Started POST "/Tasks" for ::1 at 2017-03-22 12:21:29 -0700 + +ActionController::RoutingError (No route matches [POST] "/Tasks"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.4ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (1.7ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.3ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (96.1ms) +Started GET "/tasks" for ::1 at 2017-03-22 12:28:53 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (1.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.4ms) +Completed 200 OK in 37ms (Views: 30.4ms | ActiveRecord: 1.6ms) + + +Started GET "/tasks/new" for ::1 at 2017-03-22 12:28:59 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (0.5ms) +Completed 200 OK in 18ms (Views: 16.1ms | ActiveRecord: 0.0ms) + + +Started POST "/Tasks" for ::1 at 2017-03-22 12:29:06 -0700 + +ActionController::RoutingError (No route matches [POST] "/Tasks"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.3ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (3.1ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.3ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (102.1ms) +Started GET "/tasks" for ::1 at 2017-03-22 12:33:45 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.3ms) +Completed 200 OK in 25ms (Views: 22.3ms | ActiveRecord: 0.6ms) + + +Started GET "/tasks/new" for ::1 at 2017-03-22 12:33:48 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (0.6ms) +Completed 200 OK in 26ms (Views: 22.3ms | ActiveRecord: 0.0ms) + + +Started POST "/Tasks" for ::1 at 2017-03-22 12:34:36 -0700 + +ActionController::RoutingError (No route matches [POST] "/Tasks"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.4ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (1.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.4ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.4ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (99.9ms) +Started POST "/Tasks" for ::1 at 2017-03-22 12:35:21 -0700 + +ActionController::RoutingError (No route matches [POST] "/Tasks"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.2ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (2.0ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.4ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (94.7ms) +Started GET "/tasks" for ::1 at 2017-03-22 12:37:09 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 28ms (Views: 25.5ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/1" for ::1 at 2017-03-22 12:37:11 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 32ms (Views: 19.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 12:37:15 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.5ms) +Completed 200 OK in 27ms (Views: 23.2ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/8" for ::1 at 2017-03-22 12:37:17 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"8"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 27ms (Views: 22.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 12:37:22 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.6ms) +Completed 200 OK in 28ms (Views: 23.9ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/new" for ::1 at 2017-03-22 12:37:23 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (0.5ms) +Completed 200 OK in 34ms (Views: 30.9ms | ActiveRecord: 0.0ms) + + +Started POST "/Tasks" for ::1 at 2017-03-22 12:37:36 -0700 + +ActionController::RoutingError (No route matches [POST] "/Tasks"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.3ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (2.2ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.5ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (96.6ms) +Started GET "/tasks" for ::1 at 2017-03-22 12:40:28 -0700 + +SyntaxError (/Users/laurams/ada/rails/projects/TaskList/config/routes.rb:20: syntax error, unexpected '\n', expecting =>): + +config/routes.rb:20: syntax error, unexpected '\n', expecting => + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (3.7ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.8ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (76.6ms) +Started GET "/tasks" for ::1 at 2017-03-22 12:40:48 -0700 + +ActionController::RoutingError (No route matches [GET] "/tasks"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.5ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (2.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.2ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (73.0ms) +Started GET "/tasks" for ::1 at 2017-03-22 12:41:49 -0700 + +ArgumentError (Invalid route name, already in use: 'tasks' +You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here: +http://guides.rubyonrails.org/routing.html#restricting-the-routes-created): + +config/routes.rb:8:in `block in ' +config/routes.rb:1:in `' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.8ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.0ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.7ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (73.9ms) +Started GET "/tasks" for ::1 at 2017-03-22 12:42:07 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.7ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (9.1ms) +Completed 200 OK in 32ms (Views: 24.7ms | ActiveRecord: 1.4ms) + + +Started GET "/tasks/9" for ::1 at 2017-03-22 12:42:15 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"9"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 9], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 26ms (Views: 21.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 12:42:16 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.8ms) +Completed 200 OK in 28ms (Views: 24.0ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/new" for ::1 at 2017-03-22 12:42:17 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (0.7ms) +Completed 200 OK in 25ms (Views: 22.8ms | ActiveRecord: 0.0ms) + + +Started POST "/Tasks" for ::1 at 2017-03-22 12:42:19 -0700 + +ActionController::RoutingError (No route matches [POST] "/Tasks"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.3ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (1.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.4ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.3ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (99.6ms) +Started GET "/tasks/new" for ::1 at 2017-03-22 12:43:34 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (0.5ms) +Completed 200 OK in 20ms (Views: 18.4ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 12:43:38 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.8ms) +Completed 200 OK in 21ms (Views: 18.4ms | ActiveRecord: 0.2ms) + + +Started GET "/task/1" for ::1 at 2017-03-22 12:43:39 -0700 + +ActionController::RoutingError (No route matches [GET] "/task/1"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.3ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (2.0ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.1ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (96.8ms) +Started GET "/task" for ::1 at 2017-03-22 13:30:45 -0700 + +ActionController::RoutingError (No route matches [GET] "/task"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (1.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.4ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.1ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (100.0ms) +Started GET "/tasks" for ::1 at 2017-03-22 13:31:07 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.6ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (9.0ms) +Completed 200 OK in 38ms (Views: 30.7ms | ActiveRecord: 1.5ms) + + +Started GET "/tasks/new" for ::1 at 2017-03-22 13:31:10 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (0.7ms) +Completed 200 OK in 34ms (Views: 30.2ms | ActiveRecord: 0.0ms) + + +Started POST "/Tasks" for ::1 at 2017-03-22 13:31:13 -0700 + +ActionController::RoutingError (No route matches [POST] "/Tasks"): + +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.3ms) + Rendered collection of /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [4 times] (1.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.3ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (97.2ms) +Started GET "/tasks" for ::1 at 2017-03-22 13:32:01 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.9ms) +Completed 200 OK in 21ms (Views: 18.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 13:34:15 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.0ms) +Completed 200 OK in 22ms (Views: 20.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/10" for ::1 at 2017-03-22 13:34:18 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"10"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 29ms (Views: 24.3ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/new" for ::1 at 2017-03-22 13:34:20 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (0.6ms) +Completed 200 OK in 28ms (Views: 25.2ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for ::1 at 2017-03-22 13:34:57 -0700 +Processing by TasksController#create as HTML + Parameters: {"authenticity_token"=>"KbA3UReoq9FLLmBo5qLtjZNqF9ZrOCIok0U3JZvigR57IE7OoQnYiieHaAV3CyT80RBzGariZuugp9rtMPSfRg==", "task"=>{"name"=>"Clean whiteboard", "description"=>"Erase work form last night from the whiteboard"}} +  (0.1ms) begin transaction + SQL (0.8ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Clean whiteboard"], ["description", "Erase work form last night from the whiteboard"], ["created_at", 2017-03-22 20:34:57 UTC], ["updated_at", 2017-03-22 20:34:57 UTC]] +  (0.6ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.4ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 13:34:57 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.9ms) +Completed 200 OK in 24ms (Views: 21.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/11" for ::1 at 2017-03-22 13:36:28 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"11"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 11], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 28ms (Views: 23.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 13:36:38 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.9ms) +Completed 200 OK in 31ms (Views: 27.3ms | ActiveRecord: 0.3ms) + + From 4b2279a1f4727e139a09629908036e0283caeb5a Mon Sep 17 00:00:00 2001 From: laura Date: Wed, 22 Mar 2017 13:59:50 -0700 Subject: [PATCH 10/17] added some style to home page --- app/assets/stylesheets/application.css | 23 ++++++- log/development.log | 92 ++++++++++++++++++++++++++ 2 files changed, 114 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index e02be2e7c..b3c4f02ed 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -1,4 +1,25 @@ header { - background-color: black; + background-color: darkgrey; color: white; + font-family: cursive; + font-size: 2em; +} + +main h1 { + font-family: fantasy; + color: cadetblue; +} + +ul { + color: cadetblue; +} + +li a { + text-decoration: none; + color: cadetblue; +} + +a:hover { + color: white; + text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; } diff --git a/log/development.log b/log/development.log index 386fb26b2..56f44ff99 100644 --- a/log/development.log +++ b/log/development.log @@ -2395,3 +2395,95 @@ Processing by TasksController#index as HTML Completed 200 OK in 31ms (Views: 27.3ms | ActiveRecord: 0.3ms) +Started GET "/tasks" for ::1 at 2017-03-22 13:41:54 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.2ms) +Completed 200 OK in 34ms (Views: 31.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/6" for ::1 at 2017-03-22 13:44:34 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"6"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 6], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.5ms) +Completed 200 OK in 32ms (Views: 26.8ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/11" for ::1 at 2017-03-22 13:44:36 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"11"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 11], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.2ms) +Completed 200 OK in 30ms (Views: 27.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 13:47:40 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.0ms) +Completed 200 OK in 29ms (Views: 27.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 13:48:58 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.4ms) +Completed 200 OK in 31ms (Views: 28.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 13:51:04 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.2ms) +Completed 200 OK in 32ms (Views: 29.3ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/11" for ::1 at 2017-03-22 13:51:10 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"11"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 11], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 24ms (Views: 21.2ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 13:51:11 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.2ms) +Completed 200 OK in 28ms (Views: 25.8ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 13:54:43 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.0ms) +Completed 200 OK in 32ms (Views: 29.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 13:56:32 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.1ms) +Completed 200 OK in 31ms (Views: 28.6ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/1" for ::1 at 2017-03-22 13:58:42 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 26ms (Views: 22.5ms | ActiveRecord: 0.1ms) + + From e22db5e566a1014f05a0eee7f51c8562bd5da9dc Mon Sep 17 00:00:00 2001 From: laura Date: Wed, 22 Mar 2017 15:42:54 -0700 Subject: [PATCH 11/17] Added action 'new' in order to use form_for --- app/controllers/tasks_controller.rb | 3 +- log/development.log | 49 +++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 6b97735c6..09c1ee69f 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -9,12 +9,11 @@ def index end def new + @task = Task.new end def create - puts ">>>>>>> LMS: In TasksController#create" Task.create(task_params) - redirect_to tasks_path end diff --git a/log/development.log b/log/development.log index 56f44ff99..f4c32ea04 100644 --- a/log/development.log +++ b/log/development.log @@ -2487,3 +2487,52 @@ Processing by TasksController#show as HTML Completed 200 OK in 26ms (Views: 22.5ms | ActiveRecord: 0.1ms) +Started GET "/tasks" for ::1 at 2017-03-22 14:01:47 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.2ms) +Completed 200 OK in 31ms (Views: 25.6ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/1" for ::1 at 2017-03-22 14:01:49 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 27ms (Views: 23.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/" for ::1 at 2017-03-22 14:14:38 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.7ms) +Completed 200 OK in 19ms (Views: 17.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/" for ::1 at 2017-03-22 14:16:38 -0700 + +ArgumentError (Invalid route name, already in use: 'tasks' +You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here: +http://guides.rubyonrails.org/routing.html#restricting-the-routes-created): + +config/routes.rb:6:in `block in ' +config/routes.rb:1:in `' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.0ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.8ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.7ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (74.0ms) +Started GET "/tasks/" for ::1 at 2017-03-22 14:18:30 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (7.4ms) +Completed 200 OK in 31ms (Views: 25.0ms | ActiveRecord: 0.8ms) + + From bc349728beb78da9c7315476aca72baf49505e53 Mon Sep 17 00:00:00 2001 From: laura Date: Wed, 22 Mar 2017 15:50:25 -0700 Subject: [PATCH 12/17] implemented 'form_for' to generate another task --- app/views/tasks/new.html.erb | 20 ++++++++++++-- db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 50 +++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/app/views/tasks/new.html.erb b/app/views/tasks/new.html.erb index 621b559d3..b42c73049 100644 --- a/app/views/tasks/new.html.erb +++ b/app/views/tasks/new.html.erb @@ -1,4 +1,20 @@ - + +<%= form_for @task do |f| %> + + <%= f.label :name %> + <%= f.text_field :name %> + + <%= f.label :description %> + <%= f.text_field :description %> + + <%= f.label :completed_at %> + <%= f.text_field :completed_at %> + + <%= f.submit value: "Add task" %> + +<% end %> + + diff --git a/db/development.sqlite3 b/db/development.sqlite3 index 9b76420191e775b8d32cdb0542770e329a666977..866709a850431d4806d21007df53553a9d476b71 100644 GIT binary patch delta 187 zcmZp8z}WDBae_3X;6xc`M!}5Hl?u7}MX3tO8TrZiIf*5y>G=vJK$KXNo?4=in3tjeri&GF zOOrDc5{nfo^Gg+y6Z4D=49#^7jCGBS6pW0lOf0R8jP(pn%?-?ram!S4voq*s0&U&= KK3YJ8kp}>g+B8T2 delta 57 zcmV-90LK4--~oW(0gxL35Rn{10T8iZq)!?P3+4b1un$!a0uHMVUJc<5mkl)x+YDg~ P=COgu3$x~18598v4CE3% diff --git a/log/development.log b/log/development.log index f4c32ea04..dd84e6f4b 100644 --- a/log/development.log +++ b/log/development.log @@ -2536,3 +2536,53 @@ Processing by TasksController#index as HTML Completed 200 OK in 31ms (Views: 25.0ms | ActiveRecord: 0.8ms) +Started GET "/tasks/" for ::1 at 2017-03-22 15:48:28 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (7.7ms) +Completed 200 OK in 38ms (Views: 31.1ms | ActiveRecord: 0.8ms) + + +Started GET "/tasks/1" for ::1 at 2017-03-22 15:48:35 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 20ms (Views: 17.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 15:48:39 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 27ms (Views: 24.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for ::1 at 2017-03-22 15:48:40 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (15.9ms) +Completed 200 OK in 39ms (Views: 34.3ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for ::1 at 2017-03-22 15:49:23 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"PVvSt5WfRR5oNvuL907CISKYT36duwZFwFmBABZpC3FFi9G4fH95undM9Oy2yfo93lDcEeJggiUacpnbiaS1sw==", "task"=>{"name"=>"Buy more chocolate", "description"=>"go to target and get as much as you can", "completed_at"=>""}, "commit"=>"Add task"} +  (0.1ms) begin transaction + SQL (1.4ms) INSERT INTO "tasks" ("name", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Buy more chocolate"], ["description", "go to target and get as much as you can"], ["created_at", 2017-03-22 22:49:23 UTC], ["updated_at", 2017-03-22 22:49:23 UTC]] +  (1.6ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 3.1ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 15:49:23 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.1ms) +Completed 200 OK in 23ms (Views: 20.1ms | ActiveRecord: 0.3ms) + + From e4c5958a6cc9543400fe7fe7e94e3605ae608a74 Mon Sep 17 00:00:00 2001 From: laura Date: Wed, 22 Mar 2017 15:54:52 -0700 Subject: [PATCH 13/17] Added a new action 'edit' --- app/controllers/tasks_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 09c1ee69f..5ebdfea5a 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -12,6 +12,14 @@ def new @task = Task.new end + def edit + task = Task.find(params[:id]) + task(task_params) + task.save + + redirect_to tasks_path(task.id) + end + def create Task.create(task_params) redirect_to tasks_path From a2f5f0df31b68b30dcec132fa63317d9c2e45706 Mon Sep 17 00:00:00 2001 From: laura Date: Wed, 22 Mar 2017 16:22:02 -0700 Subject: [PATCH 14/17] Wave 3 finished --- app/controllers/tasks_controller.rb | 24 +- app/views/tasks/edit.html.erb | 27 ++ app/views/tasks/show.html.erb | 1 + config/routes.rb | 2 + db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 707 ++++++++++++++++++++++++++++ 6 files changed, 751 insertions(+), 10 deletions(-) create mode 100644 app/views/tasks/edit.html.erb diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 5ebdfea5a..870b0f3d4 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -12,22 +12,26 @@ def new @task = Task.new end - def edit - task = Task.find(params[:id]) - task(task_params) - task.save - - redirect_to tasks_path(task.id) - end - def create Task.create(task_params) + redirect_to tasks_path end def show - id = params[:id].to_i - @task = Task.find(id) + @task = Task.find(params[:id]) + end + + def edit + @task = Task.find(params[:id]) + end + + def update + task = Task.find(params[:id]) + task.update_attributes(task_params) + task.save + + redirect_to tasks_path(task) end private diff --git a/app/views/tasks/edit.html.erb b/app/views/tasks/edit.html.erb new file mode 100644 index 000000000..3f9edc1bd --- /dev/null +++ b/app/views/tasks/edit.html.erb @@ -0,0 +1,27 @@ +<%= form_for @task do |f| %> + + <%= f.label :name %> + <%= f.text_field :name %> + + <%= f.label :description %> + <%= f.text_field :description %> + + <%= f.label :completed_at %> + <%= f.text_field :completed_at %> + + <%= f.submit value: "edit task" %> + +<% end %> + + diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb index 77160ae37..2c16f40f3 100644 --- a/app/views/tasks/show.html.erb +++ b/app/views/tasks/show.html.erb @@ -4,3 +4,4 @@

                        Completed at: <%= @task[:completed_at] %>

                        <%= link_to "back to tasks list", tasks_path %> +<%= link_to "Edit task", edit_task_path %> diff --git a/config/routes.rb b/config/routes.rb index 94711e978..eff1167a7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,4 +6,6 @@ post 'tasks', to: 'tasks#create' get 'tasks/:id', to: 'tasks#show', as: 'task' + get 'tasks/:id/edit', to: 'tasks#edit', as: 'edit_task' + patch 'tasks/:id', to: 'tasks#update' end diff --git a/db/development.sqlite3 b/db/development.sqlite3 index 866709a850431d4806d21007df53553a9d476b71..d6495a0626d2cbc57a7a2f703f08c27960bd045c 100644 GIT binary patch delta 242 zcmZp8z}WDBae_3X=tLQ3M$wH43;pGJO&NH&7BX;i^Dp9O;#YQDK3`Y0m{e<(xJX3JO^CKd(;2H(k%@tzVfOzaHWhCtKZ^A$?+6`YDn f^O7_4^zO~6 delta 105 zcmV-v0G9uN-~oW(0gxL35s@520THoap-&$G000aNZ~zam4^"edit"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 0], ["LIMIT", 1]] +Completed 404 Not Found in 2ms (ActiveRecord: 0.2ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=0): + +app/controllers/tasks_controller.rb:33:in `show' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (5.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.9ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (74.3ms) +Started GET "/tasks/edit" for ::1 at 2017-03-22 16:03:00 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"edit"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 0], ["LIMIT", 1]] +Completed 404 Not Found in 6ms (ActiveRecord: 0.8ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=edit): + +app/controllers/tasks_controller.rb:32:in `show' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (5.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.9ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (74.4ms) +Started GET "/tasks/2/edit" for ::1 at 2017-03-22 16:03:15 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] +Completed 406 Not Acceptable in 82ms (ActiveRecord: 0.1ms) + + + +ActionController::UnknownFormat (TasksController#edit is missing a template for this request format and variant. + +request.formats: ["text/html"] +request.variant: [] + +NOTE! For XHR/Ajax or API requests, this action would normally respond with 204 No Content: an empty white screen. Since you're loading it in a web browser, we assume that you expected to actually render a template, not nothing, so we're showing an error to be extra-clear. If you expect 204 No Content, carry on. That's what you'll get from an XHR or API request. Give it a shot.): + +actionpack (5.0.2) lib/action_controller/metal/implicit_render.rb:56:in `default_render' +actionpack (5.0.2) lib/action_controller/metal/basic_implicit_render.rb:4:in `block in send_action' +actionpack (5.0.2) lib/action_controller/metal/basic_implicit_render.rb:4:in `tap' +actionpack (5.0.2) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action' +actionpack (5.0.2) lib/abstract_controller/base.rb:188:in `process_action' +actionpack (5.0.2) lib/action_controller/metal/rendering.rb:30:in `process_action' +actionpack (5.0.2) lib/abstract_controller/callbacks.rb:20:in `block in process_action' +activesupport (5.0.2) lib/active_support/callbacks.rb:126:in `call' +activesupport (5.0.2) lib/active_support/callbacks.rb:506:in `block (2 levels) in compile' +activesupport (5.0.2) lib/active_support/callbacks.rb:455:in `call' +activesupport (5.0.2) lib/active_support/callbacks.rb:101:in `__run_callbacks__' +activesupport (5.0.2) lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks' +activesupport (5.0.2) lib/active_support/callbacks.rb:90:in `run_callbacks' +actionpack (5.0.2) lib/abstract_controller/callbacks.rb:19:in `process_action' +actionpack (5.0.2) lib/action_controller/metal/rescue.rb:20:in `process_action' +actionpack (5.0.2) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action' +activesupport (5.0.2) lib/active_support/notifications.rb:164:in `block in instrument' +activesupport (5.0.2) lib/active_support/notifications/instrumenter.rb:21:in `instrument' +activesupport (5.0.2) lib/active_support/notifications.rb:164:in `instrument' +actionpack (5.0.2) lib/action_controller/metal/instrumentation.rb:30:in `process_action' +actionpack (5.0.2) lib/action_controller/metal/params_wrapper.rb:248:in `process_action' +activerecord (5.0.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action' +actionpack (5.0.2) lib/abstract_controller/base.rb:126:in `process' +actionview (5.0.2) lib/action_view/rendering.rb:30:in `process' +actionpack (5.0.2) lib/action_controller/metal.rb:190:in `dispatch' +actionpack (5.0.2) lib/action_controller/metal.rb:262:in `dispatch' +actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:50:in `dispatch' +actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:32:in `serve' +actionpack (5.0.2) lib/action_dispatch/journey/router.rb:39:in `block in serve' +actionpack (5.0.2) lib/action_dispatch/journey/router.rb:26:in `each' +actionpack (5.0.2) lib/action_dispatch/journey/router.rb:26:in `serve' +actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:725:in `call' +rack (2.0.1) lib/rack/etag.rb:25:in `call' +rack (2.0.1) lib/rack/conditional_get.rb:25:in `call' +rack (2.0.1) lib/rack/head.rb:12:in `call' +rack (2.0.1) lib/rack/session/abstract/id.rb:222:in `context' +rack (2.0.1) lib/rack/session/abstract/id.rb:216:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/cookies.rb:613:in `call' +activerecord (5.0.2) lib/active_record/migration.rb:553:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call' +activesupport (5.0.2) lib/active_support/callbacks.rb:97:in `__run_callbacks__' +activesupport (5.0.2) lib/active_support/callbacks.rb:750:in `_run_call_callbacks' +activesupport (5.0.2) lib/active_support/callbacks.rb:90:in `run_callbacks' +actionpack (5.0.2) lib/action_dispatch/middleware/callbacks.rb:36:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call' +web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch' +web-console (3.4.0) lib/web_console/middleware.rb:18:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.0.2) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call' +rack (2.0.1) lib/rack/method_override.rb:22:in `call' +rack (2.0.1) lib/rack/runtime.rb:22:in `call' +activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call' +rack (2.0.1) lib/rack/sendfile.rb:111:in `call' +railties (5.0.2) lib/rails/engine.rb:522:in `call' +puma (3.8.2) lib/puma/configuration.rb:224:in `call' +puma (3.8.2) lib/puma/server.rb:600:in `handle_request' +puma (3.8.2) lib/puma/server.rb:435:in `process_client' +puma (3.8.2) lib/puma/server.rb:299:in `block in run' +puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.8ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (70.5ms) +Started GET "/tasks/2/edit" for ::1 at 2017-03-22 16:04:51 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.4ms) +Completed 500 Internal Server Error in 12ms (ActiveRecord: 0.1ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 1: + 2: <%= form_for @task do |f| %> + 3: + 4: <%= f.label :name %> + 5: <%= f.text_field :name %> + +app/views/tasks/edit.html.erb:2:in `_app_views_tasks_edit_html_erb__624982566588444042_70359705400320' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (7.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.2ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (76.6ms) +Started GET "/tasks/2/edit" for ::1 at 2017-03-22 16:05:14 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.8ms) +Completed 500 Internal Server Error in 11ms (ActiveRecord: 0.2ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 1: <%= form_for @task do |f| %> + 2: + 3: <%= f.label :name %> + 4: <%= f.text_field :name %> + +app/views/tasks/edit.html.erb:1:in `_app_views_tasks_edit_html_erb__624982566588444042_70359766194500' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (5.9ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (3.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (78.8ms) +Started GET "/tasks/" for ::1 at 2017-03-22 16:05:27 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (1.9ms) +Completed 200 OK in 22ms (Views: 20.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for ::1 at 2017-03-22 16:05:31 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (3.2ms) +Completed 200 OK in 28ms (Views: 24.4ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/1" for ::1 at 2017-03-22 16:05:37 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.0ms) +Completed 200 OK in 27ms (Views: 22.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1/edit" for ::1 at 2017-03-22 16:05:57 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.4ms) +Completed 500 Internal Server Error in 9ms (ActiveRecord: 0.1ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 1: <%= form_for @task do |f| %> + 2: + 3: <%= f.label :name %> + 4: <%= f.text_field :name %> + +app/views/tasks/edit.html.erb:1:in `_app_views_tasks_edit_html_erb__624982566588444042_70359712240520' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (6.0ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (81.4ms) +Started GET "/tasks/1/edit" for ::1 at 2017-03-22 16:08:06 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.4ms) +Completed 500 Internal Server Error in 20ms (ActiveRecord: 0.8ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 1: <%= form_for @task do |f| %> + 2: + 3: <%= f.label :name %> + 4: <%= f.text_field :name %> + +app/views/tasks/edit.html.erb:1:in `_app_views_tasks_edit_html_erb__624982566588444042_70359712603100' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (5.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.1ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (79.4ms) +Started GET "/tasks/1/edit" for ::1 at 2017-03-22 16:09:29 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.8ms) +Completed 500 Internal Server Error in 19ms (ActiveRecord: 0.8ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 1: <%= form_for @task do |f| %> + 2: + 3: <%= f.label :name %> + 4: <%= f.text_field :name %> + +app/views/tasks/edit.html.erb:1:in `_app_views_tasks_edit_html_erb__624982566588444042_70359768819000' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (5.7ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (82.1ms) +Started GET "/tasks/1/edit" for ::1 at 2017-03-22 16:10:19 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.7ms) +Completed 200 OK in 39ms (Views: 27.6ms | ActiveRecord: 0.8ms) + + +Started GET "/tasks/4/edit" for ::1 at 2017-03-22 16:10:25 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"4"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 4], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.6ms) +Completed 200 OK in 30ms (Views: 27.7ms | ActiveRecord: 0.1ms) + + +Started PATCH "/tasks/4" for ::1 at 2017-03-22 16:10:36 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"+1ZIuQsO8zLDkiXIoCylar3heE3tE96zOu8vkHho8zapxjEmva+Aaa87LaUxhWwb/5scgizJmnAJDcJY037tbg==", "task"=>{"name"=>"Go to Second Lunch", "description"=>"Eat less", "completed_at"=>"noon, today"}, "commit"=>"edit task", "id"=>"4"} +Completed 500 Internal Server Error in 121ms (ActiveRecord: 0.0ms) + + + +NameError (undefined local variable or method `task' for #): + +app/controllers/tasks_controller.rb:30:in `update' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.9ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.3ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (134.6ms) +Started PATCH "/tasks/4" for ::1 at 2017-03-22 16:10:52 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"+1ZIuQsO8zLDkiXIoCylar3heE3tE96zOu8vkHho8zapxjEmva+Aaa87LaUxhWwb/5scgizJmnAJDcJY037tbg==", "task"=>{"name"=>"Go to Second Lunch", "description"=>"Eat less", "completed_at"=>""}, "commit"=>"edit task", "id"=>"4"} +Completed 500 Internal Server Error in 119ms (ActiveRecord: 0.0ms) + + + +NameError (undefined local variable or method `task' for #): + +app/controllers/tasks_controller.rb:30:in `update' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.3ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (144.6ms) +Started PATCH "/tasks/4" for ::1 at 2017-03-22 16:11:41 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"+1ZIuQsO8zLDkiXIoCylar3heE3tE96zOu8vkHho8zapxjEmva+Aaa87LaUxhWwb/5scgizJmnAJDcJY037tbg==", "task"=>{"name"=>"Go to Second Lunch", "description"=>"Eat less", "completed_at"=>""}, "commit"=>"edit task", "id"=>"4"} +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.0ms) + + + +NoMethodError (undefined method `update_attributes' for nil:NilClass): + +app/controllers/tasks_controller.rb:30:in `update' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (10.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.4ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.2ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (83.8ms) +Started PATCH "/tasks/4" for ::1 at 2017-03-22 16:12:48 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"+1ZIuQsO8zLDkiXIoCylar3heE3tE96zOu8vkHho8zapxjEmva+Aaa87LaUxhWwb/5scgizJmnAJDcJY037tbg==", "task"=>{"name"=>"Go to Second Lunch", "description"=>"Eat less", "completed_at"=>""}, "commit"=>"edit task", "id"=>"4"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 4], ["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.0ms) commit transaction +  (0.0ms) begin transaction +  (0.0ms) commit transaction +Redirected to http://localhost:3000/tasks.4 +Completed 302 Found in 14ms (ActiveRecord: 1.0ms) + + +Started GET "/tasks.4" for ::1 at 2017-03-22 16:12:48 -0700 +Processing by TasksController#index as + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 55ms (Views: 37.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/4" for ::1 at 2017-03-22 16:12:52 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"4"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 4], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 24ms (Views: 20.3ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 16:12:54 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.4ms) +Completed 200 OK in 30ms (Views: 27.7ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/1" for ::1 at 2017-03-22 16:13:02 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 21ms (Views: 18.4ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/1/edit" for ::1 at 2017-03-22 16:13:09 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.8ms) +Completed 200 OK in 29ms (Views: 26.4ms | ActiveRecord: 0.1ms) + + +Started PATCH "/tasks/1" for ::1 at 2017-03-22 16:13:15 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"4NBySSpdmlxwDXcZzmbY3yguE3P6+bFZ3JqUTHyMfqayQAvWnPzpBxykf3RfzxGualR3vDsj9ZrveHmE15pg/g==", "task"=>{"name"=>"The First Task", "description"=>"Chill", "completed_at"=>"always"}, "commit"=>"edit task", "id"=>"1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.0ms) commit transaction +  (0.0ms) begin transaction +  (0.0ms) commit transaction +Redirected to http://localhost:3000/tasks.1 +Completed 302 Found in 3ms (ActiveRecord: 0.4ms) + + +Started GET "/tasks.1" for ::1 at 2017-03-22 16:13:15 -0700 +Processing by TasksController#index as + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.5ms) +Completed 200 OK in 51ms (Views: 35.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for ::1 at 2017-03-22 16:13:18 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 25ms (Views: 21.7ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 16:13:23 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.6ms) +Completed 200 OK in 27ms (Views: 24.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for ::1 at 2017-03-22 16:13:24 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 27ms (Views: 24.0ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/1/edit" for ::1 at 2017-03-22 16:13:30 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.2ms) +Completed 200 OK in 21ms (Views: 18.7ms | ActiveRecord: 0.1ms) + + +Started PATCH "/tasks/1" for ::1 at 2017-03-22 16:13:39 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"vTiKtrlDoHb7KrTpnymUgWINRvAavG7bllJDHVnvRMXvqPMpD+LTLZeDvIQOgF3wIHciP9tmKhilsK7V8vlanQ==", "task"=>{"name"=>"The First Task", "description"=>"Chill and Netflix", "completed_at"=>""}, "commit"=>"edit task", "id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.6ms) UPDATE "tasks" SET "description" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["description", "Chill and Netflix"], ["updated_at", 2017-03-22 23:13:39 UTC], ["id", 1]] +  (0.7ms) commit transaction +  (0.1ms) begin transaction +  (0.1ms) commit transaction +Redirected to http://localhost:3000/tasks.1 +Completed 302 Found in 6ms (ActiveRecord: 1.6ms) + + +Started GET "/tasks.1" for ::1 at 2017-03-22 16:13:39 -0700 +Processing by TasksController#index as + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 55ms (Views: 39.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for ::1 at 2017-03-22 16:13:42 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 27ms (Views: 22.7ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 16:13:50 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.2ms) +Completed 200 OK in 28ms (Views: 25.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/2/edit" for ::1 at 2017-03-22 16:14:16 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.4ms) +Completed 200 OK in 23ms (Views: 21.2ms | ActiveRecord: 0.1ms) + + +Started PATCH "/tasks/2" for ::1 at 2017-03-22 16:14:25 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"vDtHjG+0bzTA8ItlIN3X7bsbTpqldHw+ajMgk2ZuB/Xuqz4T2RUcb6xZgwixdB6c+WEqVWSuOP1Z0c1bzXgZrQ==", "task"=>{"name"=>"Go to Brunch...", "description"=>"Eat lots of Arepas", "completed_at"=>""}, "commit"=>"edit task", "id"=>"2"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.6ms) UPDATE "tasks" SET "name" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["name", "Go to Brunch..."], ["updated_at", 2017-03-22 23:14:25 UTC], ["id", 2]] +  (1.0ms) commit transaction +  (0.2ms) begin transaction +  (0.3ms) commit transaction +Redirected to http://localhost:3000/tasks.2 +Completed 302 Found in 8ms (ActiveRecord: 2.3ms) + + +Started GET "/tasks.2" for ::1 at 2017-03-22 16:14:25 -0700 +Processing by TasksController#index as + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.5ms) +Completed 200 OK in 49ms (Views: 31.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 16:17:58 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.0ms) +Completed 200 OK in 21ms (Views: 19.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for ::1 at 2017-03-22 16:18:00 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (189.7ms) +Completed 500 Internal Server Error in 206ms (ActiveRecord: 0.1ms) + + + +ActionView::Template::Error (undefined local variable or method `edit_task' for #<#:0x007ffbcb0ed818> +Did you mean? edit_task_url): + 4:

                        Completed at: <%= @task[:completed_at] %>

                        + 5: + 6: <%= link_to "back to tasks list", tasks_path %> + 7: <%= link_to "Edit task", edit_task %> + +app/views/tasks/show.html.erb:7:in `_app_views_tasks_show_html_erb___1747622820392710256_70359703513720' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (7.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.1ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (79.1ms) +Started GET "/tasks/1" for ::1 at 2017-03-22 16:18:40 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 22ms (Views: 18.8ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/1/edit" for ::1 at 2017-03-22 16:18:42 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.6ms) +Completed 200 OK in 27ms (Views: 23.3ms | ActiveRecord: 0.1ms) + + +Started PATCH "/tasks/1" for ::1 at 2017-03-22 16:18:54 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"hPXNUalUFo8HDZZO/YCiRy4VpNCwkJhkt9nJVSF1pkKp1XZRdvRz71PkvXpDeOlosgAhl2OF7rifaYRM6KlGSQ==", "task"=>{"name"=>"The First Task", "description"=>"Chill and Netflix and food", "completed_at"=>""}, "commit"=>"edit task", "id"=>"1"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.3ms) UPDATE "tasks" SET "description" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["description", "Chill and Netflix and food"], ["updated_at", 2017-03-22 23:18:54 UTC], ["id", 1]] +  (0.6ms) commit transaction +  (0.0ms) begin transaction +  (0.0ms) commit transaction +Redirected to http://localhost:3000/tasks.1 +Completed 302 Found in 4ms (ActiveRecord: 1.1ms) + + +Started GET "/tasks.1" for ::1 at 2017-03-22 16:18:54 -0700 +Processing by TasksController#index as + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 49ms (Views: 33.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks.1" for ::1 at 2017-03-22 16:19:23 -0700 +Processing by TasksController#index as + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 56ms (Views: 40.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/7" for ::1 at 2017-03-22 16:19:26 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"7"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 7], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 29ms (Views: 25.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-22 16:19:29 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.4ms) +Completed 200 OK in 28ms (Views: 25.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/8" for ::1 at 2017-03-22 16:19:30 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"8"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.3ms) +Completed 200 OK in 32ms (Views: 28.1ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/8/edit" for ::1 at 2017-03-22 16:19:31 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"8"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.7ms) +Completed 200 OK in 29ms (Views: 24.2ms | ActiveRecord: 0.2ms) + + +Started PATCH "/tasks/8" for ::1 at 2017-03-22 16:19:39 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"mJAwut5fbNmOfZWCxpSmYUImJRsDSi55YK86JD7KuN/jQYo3T2+KVFTTl7qy/oJngoiaRpJhjsgpoPzlENMC5w==", "task"=>{"name"=>"Call Mom and dad", "description"=>"Dial her number in your phone", "completed_at"=>""}, "commit"=>"edit task", "id"=>"8"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.5ms) UPDATE "tasks" SET "name" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["name", "Call Mom and dad"], ["updated_at", 2017-03-22 23:19:39 UTC], ["id", 8]] +  (0.8ms) commit transaction +  (0.1ms) begin transaction +  (0.1ms) commit transaction +Redirected to http://localhost:3000/tasks.8 +Completed 302 Found in 7ms (ActiveRecord: 1.7ms) + + +Started GET "/tasks.8" for ::1 at 2017-03-22 16:19:39 -0700 +Processing by TasksController#index as + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.5ms) +Completed 200 OK in 56ms (Views: 37.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for ::1 at 2017-03-22 16:19:45 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (2.3ms) +Completed 200 OK in 33ms (Views: 22.8ms | ActiveRecord: 0.0ms) + + From 28861b8ccbc8c3f6fd4119daf7d7000794f92374 Mon Sep 17 00:00:00 2001 From: laura Date: Fri, 24 Mar 2017 09:51:03 -0700 Subject: [PATCH 15/17] added delete action --- app/controllers/tasks_controller.rb | 7 + app/views/tasks/index.html.erb | 2 + config/routes.rb | 2 + db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 502 ++++++++++++++++++++++++++++ 5 files changed, 513 insertions(+) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 870b0f3d4..f5b8910c7 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -34,6 +34,13 @@ def update redirect_to tasks_path(task) end + def destroy + task = Task.find(params[:id]) + task.destroy + + redirect_to tasks_path + end + private def task_params return params.require(:task).permit(:name, :description, :completed_at) diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index 69437fcb4..f6461c699 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -4,6 +4,8 @@ <% @tasks.each_with_index do |task, index| %>
                      • <%= link_to task.name, task_path(task.id) %> + <%= link_to "Edit", edit_task_path(task) %> + <%= button_to "Delete", task_path(task), method: :delete, data: {confirm: "Are you sure you want to delete task #{task.name}" }%>
                      • <% end %> diff --git a/config/routes.rb b/config/routes.rb index eff1167a7..65334c9dd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -8,4 +8,6 @@ get 'tasks/:id', to: 'tasks#show', as: 'task' get 'tasks/:id/edit', to: 'tasks#edit', as: 'edit_task' patch 'tasks/:id', to: 'tasks#update' + delete 'tasks/:id', to: 'tasks#destroy' + end diff --git a/db/development.sqlite3 b/db/development.sqlite3 index d6495a0626d2cbc57a7a2f703f08c27960bd045c..d3a9a792c6070ccf399864dbabae41ce32ae3e39 100644 GIT binary patch delta 109 zcmV-z0FwWJ-~oW(0gxL38Ic@A0U5Dip-&$RZ~zGkp#TdD526nO4yz7c4dD%!3ZV@; z3}FlA3vjW4feMqMTF(RzRRPMgbX&#&23rXS068I(;angBAt91oBoQp#TdD526nO4yz7c4dD%!3ZV?! z3}FlA3vjW4feMqMTF(S@3c:0x007f8f5f6edfe8>): + 5:
                      • + 6: <%= link_to task.name, task_path(task.id) %> + 7: <%= link_to "Add a new task", new_task_path %> + 8: <%= link_to "Delete task", task_path(book), method: :delete %> + 9:
                      • + 10: + 11: <% end %> + +app/views/tasks/index.html.erb:8:in `block in _app_views_tasks_index_html_erb___3942627066804917186_70126879108560' +app/views/tasks/index.html.erb:4:in `each_with_index' +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb___3942627066804917186_70126879108560' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (7.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (83.6ms) +Started GET "/tasks" for ::1 at 2017-03-24 09:18:42 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.7ms) +Completed 200 OK in 222ms (Views: 219.0ms | ActiveRecord: 0.4ms) + + +Started DELETE "/tasks/12" for ::1 at 2017-03-24 09:18:49 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"M0VOjSUcnbrznlDsaZR1DqX5/z5lzf7zSwDYeOmmXIhh1TcSk73u4Z83WIH4Pbx/54Ob8aQXujB44jWwQrBC0A==", "id"=>"12"} +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms) + + + +NameError (uninitialized constant TasksController::Book): + +app/controllers/tasks_controller.rb:38:in `destroy' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (13.8ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.6ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (83.5ms) +Started GET "/tasks" for ::1 at 2017-03-24 09:19:18 -0700 +Processing by TasksController#index as HTML +Started DELETE "/tasks/12" for ::1 at 2017-03-24 09:19:28 -0700 +Started DELETE "/tasks/12" for ::1 at 2017-03-24 09:19:28 -0700 + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.4ms) +Completed 200 OK in 31ms (Views: 24.2ms | ActiveRecord: 0.8ms) + + +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"M0VOjSUcnbrznlDsaZR1DqX5/z5lzf7zSwDYeOmmXIhh1TcSk73u4Z83WIH4Pbx/54Ob8aQXujB44jWwQrBC0A==", "id"=>"12"} +Processing by TasksController#destroy as HTML + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 12], ["LIMIT", 1]] + Parameters: {"authenticity_token"=>"M0VOjSUcnbrznlDsaZR1DqX5/z5lzf7zSwDYeOmmXIhh1TcSk73u4Z83WIH4Pbx/54Ob8aQXujB44jWwQrBC0A==", "id"=>"12"} +Started GET "/tasks" for ::1 at 2017-03-24 09:19:28 -0700 +  (0.1ms) begin transaction + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 12], ["LIMIT", 1]] +Processing by TasksController#index as HTML + SQL (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 12]] +  (0.0ms) begin transaction +  (0.6ms) commit transaction + Rendering tasks/index.html.erb within layouts/application + SQL (0.1ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 12]] + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" +No template found for TasksController#destroy, rendering head :no_content +  (0.1ms) commit transaction + Rendered tasks/index.html.erb within layouts/application (32.9ms) +Completed 204 No Content in 106ms (ActiveRecord: 2.2ms) + + +No template found for TasksController#destroy, rendering head :no_content +Completed 204 No Content in 170ms (ActiveRecord: 0.5ms) + + +Completed 200 OK in 176ms (Views: 172.3ms | ActiveRecord: 0.3ms) + + +Started DELETE "/tasks/11" for ::1 at 2017-03-24 09:19:34 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"ChNK5wiVUfWQbZRSh/ngaCUPAiJ8CI3qGZrhafoIrOhYgzN4vjQirvzEnD8WUCkZZ3Vm7b3SySkqeAyhUR6ysA==", "id"=>"11"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 11], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 11]] +  (7.0ms) commit transaction +No template found for TasksController#destroy, rendering head :no_content +Completed 204 No Content in 78ms (ActiveRecord: 7.4ms) + + +Started DELETE "/tasks/11" for ::1 at 2017-03-24 09:19:36 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"ChNK5wiVUfWQbZRSh/ngaCUPAiJ8CI3qGZrhafoIrOhYgzN4vjQirvzEnD8WUCkZZ3Vm7b3SySkqeAyhUR6ysA==", "id"=>"11"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 11], ["LIMIT", 1]] +Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=11): + +app/controllers/tasks_controller.rb:38:in `destroy' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (3.9ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.1ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (74.0ms) +Started DELETE "/tasks/11" for ::1 at 2017-03-24 09:19:45 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"ChNK5wiVUfWQbZRSh/ngaCUPAiJ8CI3qGZrhafoIrOhYgzN4vjQirvzEnD8WUCkZZ3Vm7b3SySkqeAyhUR6ysA==", "id"=>"11"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 11], ["LIMIT", 1]] +Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=11): + +app/controllers/tasks_controller.rb:38:in `destroy' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (10.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (80.5ms) +Started GET "/tasks/11" for ::1 at 2017-03-24 09:19:47 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"11"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 11], ["LIMIT", 1]] +Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=11): + +app/controllers/tasks_controller.rb:22:in `show' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (3.6ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (71.5ms) +Started GET "/tasks/1" for ::1 at 2017-03-24 09:20:11 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.0ms) +Completed 200 OK in 25ms (Views: 21.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/" for ::1 at 2017-03-24 09:20:12 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.8ms) +Completed 200 OK in 30ms (Views: 28.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/" for ::1 at 2017-03-24 09:27:31 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (10.2ms) +Completed 200 OK in 39ms (Views: 32.8ms | ActiveRecord: 0.8ms) + + +Started DELETE "/tasks/10" for ::1 at 2017-03-24 09:27:36 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"2iEq7RJLtqrskPIJNsByowtsBvEh5+l/0NWqD3K2m7eIsVNypOrF8YA5+mSnabvSSRZiPuA9rbzjN0fH2aCF7w==", "id"=>"10"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 10]] +  (6.8ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 12ms (ActiveRecord: 7.4ms) + + +Started GET "/tasks" for ::1 at 2017-03-24 09:27:36 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.1ms) +Completed 200 OK in 28ms (Views: 24.4ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for ::1 at 2017-03-24 09:30:55 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (193.4ms) +Completed 500 Internal Server Error in 202ms (ActiveRecord: 0.3ms) + + + +ActionView::Template::Error (undefined local variable or method `book' for #<#:0x007f8f63eaa048>): + 4: <% @tasks.each_with_index do |task, index| %> + 5:
                      • + 6: <%= link_to task.name, task_path(task.id) %> + 7: <%= link_to "Edit", edit_task_path(book) %> + 8: <%= link_to "Delete", task_path(task), data: { method: :delete, confirm: "Are you sure you want to delete task #{task.name}" }%> + 9:
                      • + 10: + +app/views/tasks/index.html.erb:7:in `block in _app_views_tasks_index_html_erb___3942627066804917186_70126916688680' +app/views/tasks/index.html.erb:4:in `each_with_index' +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb___3942627066804917186_70126916688680' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (6.6ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (3.4ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.0ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (79.3ms) +Started GET "/tasks" for ::1 at 2017-03-24 09:31:13 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.5ms) +Completed 200 OK in 43ms (Views: 40.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/9/edit" for ::1 at 2017-03-24 09:31:23 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"9"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 9], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (27.5ms) +Completed 200 OK in 63ms (Views: 55.6ms | ActiveRecord: 0.5ms) + + +Started PATCH "/tasks/9" for ::1 at 2017-03-24 09:31:33 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"dMvKOzO5qpZK7/ZG88yWKQFoSHfnI1+nwNIfzvFyI/L8j0ECxJrsMQYt2/nEog5I5zCYmMcOVK5G4tvbdgScBw==", "task"=>{"name"=>"She worries, you know.", "description"=>"I know!!!!", "completed_at"=>""}, "commit"=>"edit task", "id"=>"9"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 9], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.3ms) UPDATE "tasks" SET "description" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["description", "I know!!!!"], ["updated_at", 2017-03-24 16:31:33 UTC], ["id", 9]] +  (1.6ms) commit transaction +  (0.1ms) begin transaction +  (0.1ms) commit transaction +Redirected to http://localhost:3000/tasks.9 +Completed 302 Found in 9ms (ActiveRecord: 2.3ms) + + +Started GET "/tasks.9" for ::1 at 2017-03-24 09:31:33 -0700 +Processing by TasksController#index as + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.7ms) +Completed 200 OK in 60ms (Views: 41.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/8" for ::1 at 2017-03-24 09:31:38 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"8"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.0ms) +Completed 200 OK in 25ms (Views: 21.3ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/8/edit" for ::1 at 2017-03-24 09:31:40 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"8"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.6ms) +Completed 200 OK in 27ms (Views: 22.8ms | ActiveRecord: 0.2ms) + + +Started PATCH "/tasks/8" for ::1 at 2017-03-24 09:31:59 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"neUEuWjy1VkM9C9mCxHV/11lS0oYoYA5mqwzjv4RhIXmNL40+cIz1NZaLV5/e/H5ncv0F4mKIIjTo/VP0Ag+vQ==", "task"=>{"name"=>"Call Mom and dad", "description"=>"Dial her number in your phone", "completed_at"=>""}, "commit"=>"edit task", "id"=>"8"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.1ms) commit transaction +  (0.0ms) begin transaction +  (0.0ms) commit transaction +Redirected to http://localhost:3000/tasks.8 +Completed 302 Found in 3ms (ActiveRecord: 0.3ms) + + +Started GET "/tasks.8" for ::1 at 2017-03-24 09:31:59 -0700 +Processing by TasksController#index as + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.7ms) +Completed 200 OK in 48ms (Views: 31.4ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks.8" for ::1 at 2017-03-24 09:39:28 -0700 +Processing by TasksController#index as + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (112.1ms) +Completed 500 Internal Server Error in 147ms (ActiveRecord: 0.2ms) + + + +ActionView::Template::Error (undefined method `buttom_to' for #<#:0x007f8f64862d10> +Did you mean? button_to + button_tag): + 5:
                      • + 6: <%= link_to task.name, task_path(task.id) %> + 7: <%= link_to "Edit", edit_task_path(task) %> + 8: <%= buttom_to "Delete", task_path(task), method: :delete, data: {confirm: "Are you sure you want to delete task #{task.name}" }%> + 9:
                      • + 10: + 11: <% end %> + +app/views/tasks/index.html.erb:8:in `block in _app_views_tasks_index_html_erb___3942627066804917186_70126921794180' +app/views/tasks/index.html.erb:4:in `each_with_index' +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb___3942627066804917186_70126921794180' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (7.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.7ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (73.9ms) +Started GET "/tasks.8" for ::1 at 2017-03-24 09:40:12 -0700 +Processing by TasksController#index as + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (115.5ms) +Completed 500 Internal Server Error in 152ms (ActiveRecord: 0.3ms) + + + +ActionView::Template::Error (undefined method `bottom_to' for #<#:0x007f8f5cb0fcc8>): + 5:
                      • + 6: <%= link_to task.name, task_path(task.id) %> + 7: <%= link_to "Edit", edit_task_path(task) %> + 8: <%= bottom_to "Delete", task_path(task), method: :delete, data: {confirm: "Are you sure you want to delete task #{task.name}" }%> + 9:
                      • + 10: + 11: <% end %> + +app/views/tasks/index.html.erb:8:in `block in _app_views_tasks_index_html_erb___3942627066804917186_70126879548420' +app/views/tasks/index.html.erb:4:in `each_with_index' +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb___3942627066804917186_70126879548420' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (5.5ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (72.9ms) +Started GET "/tasks" for ::1 at 2017-03-24 09:40:17 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (106.6ms) +Completed 500 Internal Server Error in 113ms (ActiveRecord: 0.2ms) + + + +ActionView::Template::Error (undefined method `bottom_to' for #<#:0x007f8f64861028>): +Started GET "/tasks" for ::1 at 2017-03-24 09:40:17 -0700 + 5:
                      • + 6: <%= link_to task.name, task_path(task.id) %> + 7: <%= link_to "Edit", edit_task_path(task) %> + 8: <%= bottom_to "Delete", task_path(task), method: :delete, data: {confirm: "Are you sure you want to delete task #{task.name}" }%> + 9:
                      • + 10: + 11: <% end %> + +app/views/tasks/index.html.erb:8:in `block in _app_views_tasks_index_html_erb___3942627066804917186_70126921782840' +app/views/tasks/index.html.erb:4:in `each_with_index' +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb___3942627066804917186_70126921782840' +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (98.6ms) +Completed 500 Internal Server Error in 106ms (ActiveRecord: 0.3ms) + + + +ActionView::Template::Error (undefined method `bottom_to' for #<#:0x007f8f648c93d0>): + 5:
                      • + 6: <%= link_to task.name, task_path(task.id) %> + 7: <%= link_to "Edit", edit_task_path(task) %> + 8: <%= bottom_to "Delete", task_path(task), method: :delete, data: {confirm: "Are you sure you want to delete task #{task.name}" }%> + 9:
                      • + 10: + 11: <% end %> + +app/views/tasks/index.html.erb:8:in `block in _app_views_tasks_index_html_erb___3942627066804917186_70126921994020' +app/views/tasks/index.html.erb:4:in `each_with_index' +app/views/tasks/index.html.erb:4:in `_app_views_tasks_index_html_erb___3942627066804917186_70126921994020' + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (6.3ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.8ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.2ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (79.2ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (7.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (2.1ms) + Rendering /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms) + Rendered /Users/laurams/.rvm/gems/ruby-2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (84.3ms) +Started GET "/tasks" for ::1 at 2017-03-24 09:40:58 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (4.3ms) +Completed 200 OK in 27ms (Views: 24.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/9/edit" for ::1 at 2017-03-24 09:41:10 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"9"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 9], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.7ms) +Completed 200 OK in 29ms (Views: 24.5ms | ActiveRecord: 0.3ms) + + +Started PATCH "/tasks/9" for ::1 at 2017-03-24 09:41:14 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"nhpyHceGNLBYcgtcgZ7/5wm4Aq5TFCuVYLtm/+10VcUWXvkkMKVyFxSwJuO28GeG7+DSQXM5IJzmi6LqagLqMA==", "task"=>{"name"=>"She worries, you know.", "description"=>"I know!!!!", "completed_at"=>""}, "commit"=>"edit task", "id"=>"9"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 9], ["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.0ms) commit transaction +  (0.0ms) begin transaction +  (0.1ms) commit transaction +Redirected to http://localhost:3000/tasks.9 +Completed 302 Found in 3ms (ActiveRecord: 0.3ms) + + +Started GET "/tasks.9" for ::1 at 2017-03-24 09:41:14 -0700 +Processing by TasksController#index as + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (4.1ms) +Completed 200 OK in 57ms (Views: 40.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/8/edit" for ::1 at 2017-03-24 09:41:18 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"8"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.4ms) +Completed 200 OK in 26ms (Views: 22.7ms | ActiveRecord: 0.1ms) + + +Started PATCH "/tasks/8" for ::1 at 2017-03-24 09:41:22 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"M7vsvSCZAj7/1+vfNe1E8Gq+DpidNeD8q1hYgV17Bh5IalYwsanksyV56edBh2D2qhCxxQweQE3iV55Ac2K8Jg==", "task"=>{"name"=>"Call Mom and dad", "description"=>"Dial her number in your phone", "completed_at"=>""}, "commit"=>"edit task", "id"=>"8"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.0ms) commit transaction +  (0.0ms) begin transaction +  (0.0ms) commit transaction +Redirected to http://localhost:3000/tasks.8 +Completed 302 Found in 3ms (ActiveRecord: 0.3ms) + + +Started GET "/tasks.8" for ::1 at 2017-03-24 09:41:22 -0700 +Processing by TasksController#index as + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.9ms) +Completed 200 OK in 50ms (Views: 34.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for ::1 at 2017-03-24 09:50:10 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (3.3ms) +Completed 200 OK in 37ms (Views: 32.9ms | ActiveRecord: 0.0ms) + + From cc7f289e1fe40b36d9cd8385a6e66fcbb1fef619 Mon Sep 17 00:00:00 2001 From: laura Date: Fri, 24 Mar 2017 15:38:43 -0700 Subject: [PATCH 16/17] Completed task button action added --- app/controllers/tasks_controller.rb | 18 +- app/views/tasks/_form.html.erb | 13 + app/views/tasks/completed.erb | 1 + app/views/tasks/edit.html.erb | 28 +- app/views/tasks/index.html.erb | 4 +- app/views/tasks/new.html.erb | 4 +- app/views/tasks/show.html.erb | 2 +- config/routes.rb | 1 + db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 1854 +++++++++++++++++++++++++++ 10 files changed, 1891 insertions(+), 34 deletions(-) create mode 100644 app/views/tasks/_form.html.erb create mode 100644 app/views/tasks/completed.erb diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index f5b8910c7..a2fa8de0f 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -1,9 +1,5 @@ class TasksController < ApplicationController - def self.random_time - Time.at(rand * Time.now.to_i) - end - def index @tasks = Task.all end @@ -34,6 +30,19 @@ def update redirect_to tasks_path(task) end + def self.random_time + Time.at(rand * Time.now.to_i) + end + + def completed + @task = Task.find(params[:id]) + # @task.completed = true + @task.completed_at = Time.at(rand * Time.now.to_i) + @task.save + + redirect_to task_path + end + def destroy task = Task.find(params[:id]) task.destroy @@ -41,6 +50,7 @@ def destroy redirect_to tasks_path end + private def task_params return params.require(:task).permit(:name, :description, :completed_at) diff --git a/app/views/tasks/_form.html.erb b/app/views/tasks/_form.html.erb new file mode 100644 index 000000000..d2f243954 --- /dev/null +++ b/app/views/tasks/_form.html.erb @@ -0,0 +1,13 @@ +
                        + <%= form_for @task do |f| %> + + <%= f.label :name %> + <%= f.text_field :name %> + + <%= f.label :description %> + <%= f.text_field :description %> + + <%= f.submit value: "#{submit_text} Task" %> + + <% end %> +
                        diff --git a/app/views/tasks/completed.erb b/app/views/tasks/completed.erb new file mode 100644 index 000000000..e72aaec56 --- /dev/null +++ b/app/views/tasks/completed.erb @@ -0,0 +1 @@ +<%= render partial: "form", locals: { submit_text: "Completed" } %> diff --git a/app/views/tasks/edit.html.erb b/app/views/tasks/edit.html.erb index 3f9edc1bd..7a70b3299 100644 --- a/app/views/tasks/edit.html.erb +++ b/app/views/tasks/edit.html.erb @@ -1,27 +1 @@ -<%= form_for @task do |f| %> - - <%= f.label :name %> - <%= f.text_field :name %> - - <%= f.label :description %> - <%= f.text_field :description %> - - <%= f.label :completed_at %> - <%= f.text_field :completed_at %> - - <%= f.submit value: "edit task" %> - -<% end %> - - +<%= render partial: "form", locals: { submit_text: "Edit" } %> diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index f6461c699..edea3abef 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -5,7 +5,9 @@
                      • <%= link_to task.name, task_path(task.id) %> <%= link_to "Edit", edit_task_path(task) %> - <%= button_to "Delete", task_path(task), method: :delete, data: {confirm: "Are you sure you want to delete task #{task.name}" }%> + <%= button_to "completed", completed_task_path(task) %> + <%= button_to "Delete", task_path(task), method: :delete, + data: {confirm: "Are you sure you want to delete task: #{task.name}?" }%>
                      • <% end %> diff --git a/app/views/tasks/new.html.erb b/app/views/tasks/new.html.erb index b42c73049..afddbe5c1 100644 --- a/app/views/tasks/new.html.erb +++ b/app/views/tasks/new.html.erb @@ -1,4 +1,6 @@ +<%= render partial: "form", locals: { submit_text: "Create"} %> +