From 80296bed634c735c15840b726cbfc5a0485f9c05 Mon Sep 17 00:00:00 2001 From: Amy Cash Date: Mon, 18 Sep 2017 15:53:43 -0700 Subject: [PATCH 01/12] Complete Wave 0 --- Gemfile | 54 +++++ Gemfile.lock | 196 ++++++++++++++++ Rakefile | 6 + app/assets/config/manifest.js | 3 + app/assets/images/.keep | 0 app/assets/javascripts/application.js | 15 ++ app/assets/javascripts/cable.js | 13 ++ app/assets/javascripts/channels/.keep | 0 app/assets/javascripts/tasks.coffee | 3 + app/assets/stylesheets/application.css | 15 ++ app/assets/stylesheets/tasks.scss | 8 + 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 | 24 ++ app/helpers/application_helper.rb | 2 + app/helpers/tasks_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 | 18 ++ app/views/layouts/mailer.html.erb | 13 ++ app/views/layouts/mailer.text.erb | 1 + app/views/tasks/index.html.erb | 14 ++ bin/bundle | 3 + bin/rails | 9 + bin/rake | 9 + bin/setup | 38 ++++ bin/spring | 17 ++ bin/update | 29 +++ bin/yarn | 11 + config.ru | 5 + config/application.rb | 18 ++ config/boot.rb | 3 + config/cable.yml | 10 + config/database.yml | 25 ++ config/environment.rb | 5 + config/environments/development.rb | 54 +++++ config/environments/production.rb | 91 ++++++++ config/environments/test.rb | 42 ++++ .../application_controller_renderer.rb | 8 + config/initializers/assets.rb | 14 ++ 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/wrap_parameters.rb | 14 ++ config/locales/en.yml | 33 +++ config/puma.rb | 56 +++++ config/routes.rb | 19 ++ config/secrets.yml | 32 +++ config/spring.rb | 6 + db/seeds.rb | 7 + lib/assets/.keep | 0 lib/tasks/.keep | 0 log/.keep | 0 log/development.log | 214 ++++++++++++++++++ package.json | 5 + 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 | 1 + test/application_system_test_case.rb | 5 + test/controllers/.keep | 0 test/controllers/tasks_controller_test.rb | 9 + 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/system/.keep | 0 test/test_helper.rb | 9 + vendor/.keep | 0 80 files changed, 1444 insertions(+) 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/javascripts/tasks.coffee create mode 100644 app/assets/stylesheets/application.css create mode 100644 app/assets/stylesheets/tasks.scss 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/helpers/tasks_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 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 100755 bin/yarn 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/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/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 package.json 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/application_system_test_case.rb create mode 100644 test/controllers/.keep create mode 100644 test/controllers/tasks_controller_test.rb 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/system/.keep create mode 100644 test/test_helper.rb create mode 100644 vendor/.keep diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..13ab51252 --- /dev/null +++ b/Gemfile @@ -0,0 +1,54 @@ +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.1.4' +# Use sqlite3 as the database for Active Record +gem 'sqlite3' +# Use Puma as the app server +gem 'puma', '~> 3.7' +# Use SCSS for stylesheets +gem 'sass-rails', '~> 5.0' +# Use Uglifier as compressor for JavaScript assets +gem 'uglifier', '>= 1.3.0' +# See https://github.com/rails/execjs#readme for more supported runtimes +# gem 'therubyracer', platforms: :ruby + +# Use CoffeeScript for .coffee assets and views +gem 'coffee-rails', '~> 4.2' +# 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', platforms: [:mri, :mingw, :x64_mingw] + # Adds support for Capybara system testing and selenium driver + gem 'capybara', '~> 2.13' + gem 'selenium-webdriver' +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', '< 3.2' + # 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..98977da37 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,196 @@ +GEM + remote: https://rubygems.org/ + specs: + actioncable (5.1.4) + actionpack (= 5.1.4) + nio4r (~> 2.0) + websocket-driver (~> 0.6.1) + actionmailer (5.1.4) + actionpack (= 5.1.4) + actionview (= 5.1.4) + activejob (= 5.1.4) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (5.1.4) + actionview (= 5.1.4) + activesupport (= 5.1.4) + rack (~> 2.0) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.1.4) + activesupport (= 5.1.4) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (5.1.4) + activesupport (= 5.1.4) + globalid (>= 0.3.6) + activemodel (5.1.4) + activesupport (= 5.1.4) + activerecord (5.1.4) + activemodel (= 5.1.4) + activesupport (= 5.1.4) + arel (~> 8.0) + activesupport (5.1.4) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (~> 0.7) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + arel (8.0.0) + bindex (0.5.0) + builder (3.2.3) + byebug (9.1.0) + capybara (2.15.1) + addressable + mini_mime (>= 0.1.3) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + childprocess (0.7.1) + ffi (~> 1.0, >= 1.0.11) + coffee-rails (4.2.2) + coffee-script (>= 2.2.0) + railties (>= 4.0.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.12.2) + concurrent-ruby (1.0.5) + erubi (1.6.1) + execjs (2.7.0) + ffi (1.9.18) + globalid (0.4.0) + activesupport (>= 4.2.0) + i18n (0.8.6) + jbuilder (2.7.0) + activesupport (>= 4.2.0) + multi_json (>= 1.2) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + loofah (2.0.3) + nokogiri (>= 1.5.9) + mail (2.6.6) + 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_mime (0.1.4) + mini_portile2 (2.2.0) + minitest (5.10.3) + multi_json (1.12.2) + nio4r (2.1.0) + nokogiri (1.8.0) + mini_portile2 (~> 2.2.0) + public_suffix (3.0.0) + puma (3.10.0) + rack (2.0.3) + rack-test (0.7.0) + rack (>= 1.0, < 3) + rails (5.1.4) + actioncable (= 5.1.4) + actionmailer (= 5.1.4) + actionpack (= 5.1.4) + actionview (= 5.1.4) + activejob (= 5.1.4) + activemodel (= 5.1.4) + activerecord (= 5.1.4) + activesupport (= 5.1.4) + bundler (>= 1.3.0) + railties (= 5.1.4) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + railties (5.1.4) + actionpack (= 5.1.4) + activesupport (= 5.1.4) + method_source + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (12.1.0) + rb-fsevent (0.10.2) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + ruby_dep (1.5.0) + rubyzip (1.2.1) + sass (3.5.1) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + 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) + selenium-webdriver (3.5.2) + childprocess (~> 0.5) + rubyzip (~> 1.0) + spring (2.0.2) + 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.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + sqlite3 (1.3.13) + thor (0.20.0) + thread_safe (0.3.6) + tilt (2.0.8) + turbolinks (5.0.1) + turbolinks-source (~> 5) + turbolinks-source (5.0.3) + tzinfo (1.2.3) + thread_safe (~> 0.1) + uglifier (3.2.0) + execjs (>= 0.3.0, < 3) + web-console (3.5.1) + actionview (>= 5.0) + activemodel (>= 5.0) + bindex (>= 0.4.0) + railties (>= 5.0) + websocket-driver (0.6.5) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + xpath (2.1.0) + nokogiri (~> 1.3) + +PLATFORMS + ruby + +DEPENDENCIES + byebug + capybara (~> 2.13) + coffee-rails (~> 4.2) + jbuilder (~> 2.5) + listen (>= 3.0.5, < 3.2) + puma (~> 3.7) + rails (~> 5.1.4) + sass-rails (~> 5.0) + selenium-webdriver + spring + spring-watcher-listen (~> 2.0.0) + sqlite3 + turbolinks (~> 5) + tzinfo-data + uglifier (>= 1.3.0) + web-console (>= 3.3.0) + +BUNDLED WITH + 1.15.4 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..46b20359f --- /dev/null +++ b/app/assets/javascripts/application.js @@ -0,0 +1,15 @@ +// 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, 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 rails-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..739aa5f02 --- /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/javascripts/tasks.coffee b/app/assets/javascripts/tasks.coffee new file mode 100644 index 000000000..24f83d18b --- /dev/null +++ b/app/assets/javascripts/tasks.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css new file mode 100644 index 000000000..d05ea0f51 --- /dev/null +++ b/app/assets/stylesheets/application.css @@ -0,0 +1,15 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's + * vendor/assets/stylesheets directory can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the bottom of the + * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS + * files in this directory. Styles in this file should be added after the last require_* statement. + * It is generally better to create a new file per style scope. + * + *= require_tree . + *= require_self + */ diff --git a/app/assets/stylesheets/tasks.scss b/app/assets/stylesheets/tasks.scss new file mode 100644 index 000000000..cb36a95be --- /dev/null +++ b/app/assets/stylesheets/tasks.scss @@ -0,0 +1,8 @@ +// Place all the styles related to the Tasks controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ + + +header { + font-family: cursive; +} 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..4e570de96 --- /dev/null +++ b/app/controllers/tasks_controller.rb @@ -0,0 +1,24 @@ +class TasksController < ApplicationController + def index + @tasks = [ {name: "Dishes", status: "Done"}, + {name: "Gym", status: "Not Done"}, + {name: "Dinner", status: "Yummy"}] + end + + def edit_task + end + + def create + end + + def show + end + + def update + end + + def show + 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/helpers/tasks_helper.rb b/app/helpers/tasks_helper.rb new file mode 100644 index 000000000..ce894d00c --- /dev/null +++ b/app/helpers/tasks_helper.rb @@ -0,0 +1,2 @@ +module TasksHelper +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..7a592d922 --- /dev/null +++ b/app/views/layouts/application.html.erb @@ -0,0 +1,18 @@ + + + + TaskList + <%= csrf_meta_tags %> + + <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> + <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> + + +
+

This is a test to see how this works

+
+ + + <%= 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..c88d97ecb --- /dev/null +++ b/app/views/tasks/index.html.erb @@ -0,0 +1,14 @@ +

Tasks#index

+

Find me in app/views/tasks/index.html.erb

+ +

+ <%= "These are the breaks" %> +

+ + 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..78c4e861d --- /dev/null +++ b/bin/setup @@ -0,0 +1,38 @@ +#!/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') + + # Install JavaScript dependencies if using Yarn + # system('bin/yarn') + + + # 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/bin/yarn b/bin/yarn new file mode 100755 index 000000000..c2bacef83 --- /dev/null +++ b/bin/yarn @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby +VENDOR_PATH = File.expand_path('..', __dir__) +Dir.chdir(VENDOR_PATH) do + begin + exec "yarnpkg #{ARGV.join(" ")}" + rescue Errno::ENOENT + $stderr.puts "Yarn executable was not detected in the system." + $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" + exit 1 + end +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..16136d34f --- /dev/null +++ b/config/application.rb @@ -0,0 +1,18 @@ +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 + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 5.1 + + # 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..cc73740fa --- /dev/null +++ b/config/cable.yml @@ -0,0 +1,10 @@ +development: + adapter: async + +test: + adapter: async + +production: + adapter: redis + url: redis://localhost:6379/1 + channel_prefix: TaskList_production diff --git a/config/database.yml b/config/database.yml new file mode 100644 index 000000000..0d02f2498 --- /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: <%= ENV.fetch("RAILS_MAX_THREADS") { 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..5187e2218 --- /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=#{2.days.seconds.to_i}" + } + 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..fcd7d8b14 --- /dev/null +++ b/config/environments/production.rb @@ -0,0 +1,91 @@ +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 + + # Attempt to read encrypted secrets from `config/secrets.yml.enc`. + # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or + # `config/secrets.yml.key`. + config.read_encrypted_secrets = 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..8e5cbde53 --- /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=#{1.hour.seconds.to_i}" + } + + # 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..89d2efab2 --- /dev/null +++ b/config/initializers/application_controller_renderer.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# ActiveSupport::Reloader.to_prepare do +# ApplicationController.renderer.defaults.merge!( +# http_host: 'example.org', +# https: false +# ) +# end diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb new file mode 100644 index 000000000..4b828e80c --- /dev/null +++ b/config/initializers/assets.rb @@ -0,0 +1,14 @@ +# 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 +# Add Yarn node_modules folder to the asset load path. +Rails.application.config.assets.paths << Rails.root.join('node_modules') + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in the app/assets +# folder are already added. +# Rails.application.config.assets.precompile += %w( admin.js admin.css ) 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/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..decc5a857 --- /dev/null +++ b/config/locales/en.yml @@ -0,0 +1,33 @@ +# 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. +# +# The following keys must be escaped otherwise they will not be retrieved by +# the default I18n backend: +# +# true, false, on, off, yes, no +# +# Instead, surround them with single quotes. +# +# en: +# 'true': 'foo' +# +# 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..1e19380dc --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,56 @@ +# 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 } +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! + +# If you are preloading your application and using Active Record, it's +# recommended that you close any connections to the database before workers +# are forked to prevent connection leakage. +# +# before_fork do +# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord) +# end + +# 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 the `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, as 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..8dbdf9e71 --- /dev/null +++ b/config/routes.rb @@ -0,0 +1,19 @@ +Rails.application.routes.draw do + get 'tasks/index' + + # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html + +# get '/tasks/new', to: 'tasks#new', as: 'new_task' +get '/tasks', to: 'tasks#index', as: 'index' +# +# get '/tasks/:id/edit', to: 'tasks#edit', as: 'edit_task' +# +# post '/tasks', to: 'tasks#create', as: 'create_task' +# get '/tasks/:id', to: 'tasks#show', as: 'show_task' +# +# patch '/tasks:id', to: 'tasks#update', as: 'update_task' +# delete '/tasks:id', to: 'tasks#destroy', as: 'delete' + + + +end diff --git a/config/secrets.yml b/config/secrets.yml new file mode 100644 index 000000000..8731af94a --- /dev/null +++ b/config/secrets.yml @@ -0,0 +1,32 @@ +# 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. + +# Shared secrets are available across all environments. + +# shared: +# api_key: a1B2c3D4e5F6 + +# Environmental secrets are only available for that specific environment. + +development: + secret_key_base: 48f6efddf0ea7c2ad845e8417509a62a8382034367aafe277411ce41b225399aa67a7ff2c53c0e59971c6e5ab606cd294b5bd22f2005b71abb2097afb6eaef06 + +test: + secret_key_base: acd2cba187e445b1be9ec5ae824c7a1dc0cf91b8210223729e2d2db95ee84f06fcbcdaec6f8523646ea80167624aec618f893df285377b9dc07582ba613b51dc + +# Do not keep production secrets in the unencrypted secrets file. +# Instead, either read values from the environment. +# Or, use `bin/rails secrets:setup` to configure encrypted secrets +# and move the `production:` environment over there. + +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/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..76415c028 --- /dev/null +++ b/log/development.log @@ -0,0 +1,214 @@ +Started GET "/" for 127.0.0.1 at 2017-09-18 14:55:06 -0700 +Processing by Rails::WelcomeController#index as HTML + Rendering /Users/amymcash/.rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/amymcash/.rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb (4.2ms) +Completed 200 OK in 126ms (Views: 11.5ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-18 14:57:42 -0700 + +ActionController::RoutingError (No route matches [GET] "/tasks"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/Tasks" for 127.0.0.1 at 2017-09-18 14:57:53 -0700 + +ActionController::RoutingError (No route matches [GET] "/Tasks"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/books" for 127.0.0.1 at 2017-09-18 14:58:14 -0700 + +ActionController::RoutingError (No route matches [GET] "/books"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/" for 127.0.0.1 at 2017-09-18 14:58:39 -0700 +Processing by Rails::WelcomeController#index as HTML + Rendering /Users/amymcash/.rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/amymcash/.rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb (3.0ms) +Completed 200 OK in 11ms (Views: 7.4ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-18 15:00: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.3ms) +Completed 200 OK in 315ms (Views: 312.6ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-18 15:04:12 -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 16ms (Views: 14.0ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-18 15:06: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 18ms (Views: 15.7ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-18 15:07:46 -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 19ms (Views: 16.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-18 15:08: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.9ms) +Completed 500 Internal Server Error in 10ms + + + +SyntaxError (/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/index.html.erb:11: syntax error, unexpected tIDENTIFIER, expecting ')' +buffer.append=( task[:name] is task[:status] );@output_buffe + ^): + +app/views/tasks/index.html.erb:11: syntax error, unexpected tIDENTIFIER, expecting ')' +Started GET "/tasks" for 127.0.0.1 at 2017-09-18 15:09:33 -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 19ms (Views: 17.1ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-18 15:09:53 -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 20ms (Views: 17.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-18 15:37:02 -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 39ms (Views: 36.5ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-18 15:38:03 -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 45ms (Views: 42.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-18 15:51:03 -0700 + +ActionController::RoutingError (No route matches [GET] "/tasks"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/tasks" for 127.0.0.1 at 2017-09-18 15:51:31 -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 30ms (Views: 27.9ms) + + diff --git a/package.json b/package.json new file mode 100644 index 000000000..f9cbc5515 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "name": "TaskList", + "private": true, + "dependencies": {} +} diff --git a/public/404.html b/public/404.html new file mode 100644 index 000000000..2be3af26f --- /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..c08eac0d1 --- /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..78a030af2 --- /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..37b576a4a --- /dev/null +++ b/public/robots.txt @@ -0,0 +1 @@ +# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb new file mode 100644 index 000000000..d19212abd --- /dev/null +++ b/test/application_system_test_case.rb @@ -0,0 +1,5 @@ +require "test_helper" + +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase + driven_by :selenium, using: :chrome, screen_size: [1400, 1400] +end diff --git a/test/controllers/.keep b/test/controllers/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/test/controllers/tasks_controller_test.rb b/test/controllers/tasks_controller_test.rb new file mode 100644 index 000000000..67683c951 --- /dev/null +++ b/test/controllers/tasks_controller_test.rb @@ -0,0 +1,9 @@ +require 'test_helper' + +class TasksControllerTest < ActionDispatch::IntegrationTest + test "should get index" do + get tasks_index_url + assert_response :success + end + +end 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/system/.keep b/test/system/.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..e3c4ff0b8 --- /dev/null +++ b/test/test_helper.rb @@ -0,0 +1,9 @@ +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/.keep b/vendor/.keep new file mode 100644 index 000000000..e69de29bb From d0bf10e86216e551cdb25b002018cfa3c065dc7b Mon Sep 17 00:00:00 2001 From: Amy Cash Date: Wed, 20 Sep 2017 07:51:02 -0700 Subject: [PATCH 02/12] Add tasks and format html a little --- app/controllers/tasks_controller.rb | 4 +- app/models/task.rb | 2 + app/views/tasks/index.html.erb | 2 +- db/development.sqlite3 | Bin 0 -> 28672 bytes db/migrate/20170920035525_create_tasks.rb | 11 + db/schema.rb | 23 +++ log/development.log | 241 ++++++++++++++++++++++ test/fixtures/tasks.yml | 11 + test/models/task_test.rb | 7 + 9 files changed, 297 insertions(+), 4 deletions(-) create mode 100644 app/models/task.rb create mode 100644 db/development.sqlite3 create mode 100644 db/migrate/20170920035525_create_tasks.rb create mode 100644 db/schema.rb create mode 100644 test/fixtures/tasks.yml create mode 100644 test/models/task_test.rb diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 4e570de96..0dbb21bf3 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -1,8 +1,6 @@ class TasksController < ApplicationController def index - @tasks = [ {name: "Dishes", status: "Done"}, - {name: "Gym", status: "Not Done"}, - {name: "Dinner", status: "Yummy"}] + @tasks = Task.all end def edit_task 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/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index c88d97ecb..b7b77aa2e 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -8,7 +8,7 @@ diff --git a/db/development.sqlite3 b/db/development.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..2c42f957b0e5b6fe1577c8708321ecd4dcb68143 GIT binary patch literal 28672 zcmeI*Pfyxl90%~HATXC{-Kj?(@i2*kZK0^_Fgqp24ACKEF*}fF@N6{FqHQ61bbB3p z4W9P4mbk=Z*=bJ;F@SI~S)BPcw0-*g%k%pb4i8TW$L~v)&*|rmYcro_$pVoivP~%= zBr({Etw#h*!G8}Vy?(&aa}B${>R z_p^M<=EI$K&w`3m%2QY6XhJaz>Fb*?DCX8J$LFrY+I5@zOf+Sa@@7Uuo>V0eIOUgj z3k2xGcCGo;RKm86~+_9(eS)>kZ$_i6$vC5?5;L(?Yn{ab3HY70l(I1s}CJ zu}kt#B3{@a009U<00Izz00bZa0SG_<0uXo-0t-?krK{S8x}~dX)-ZJAxrht%|0i*C z5d;Jv009U<00Izz00bZa0SG`~An-DpnjM}0_t*cgiF^$t2tWV=5P$##AOHafKmY;| zfB*y@iNK*0TV6Iz?({6T + 7: + 8: + + + + + + + + + + + + + + + diff --git a/config/routes.rb b/config/routes.rb index 8dbdf9e71..aea407a0c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,16 +3,19 @@ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html -# get '/tasks/new', to: 'tasks#new', as: 'new_task' +get '/tasks/new', to: 'tasks#new', as: 'new_task' +post '/tasks/new', to: 'tasks#new', as: 'add_task' + get '/tasks', to: 'tasks#index', as: 'index' -# -# get '/tasks/:id/edit', to: 'tasks#edit', as: 'edit_task' -# -# post '/tasks', to: 'tasks#create', as: 'create_task' -# get '/tasks/:id', to: 'tasks#show', as: 'show_task' -# -# patch '/tasks:id', to: 'tasks#update', as: 'update_task' -# delete '/tasks:id', to: 'tasks#destroy', as: 'delete' + + +get '/tasks/:id/edit', to: 'tasks#edit', as: 'edit_task' + +post '/tasks', to: 'tasks#create', as: 'create_task' +get '/tasks/:id', to: 'tasks#show', as: 'show_task' + +patch '/tasks:id', to: 'tasks#update', as: 'update_task' +delete '/tasks:id', to: 'tasks#destroy', as: 'delete' diff --git a/db/development.sqlite3 b/db/development.sqlite3 index 2c42f957b0e5b6fe1577c8708321ecd4dcb68143..947e49e48dba7985f747e9c7e69ad43fc1e62c21 100644 GIT binary patch delta 129 zcmZp8z}WDBae_1>$3z)tMvjdMOZ>T*`Q9<`&*gXFd$(Co-~nG)2s1l_thAz|qkC$J zLP$npiGLB0$}BcAFf`XSu+%j>H733@xk-%&iPf^-K-SjLpn(%WQUu-z~t%3;^!3 BAZ!2t delta 40 wcmZp8z}WDBae_1>`$QRMM)r*fOZ+*Q_+1$I=kmL378J1H-|P~"T+i1zkFYHHwGsumG/05MsQgsmhx0JJvdQKdLGhvc4AAf0JYcDbNQzuQp6LyhkUzb7l35CBaaEQx8StVBb0L2iw==", "title"=>"Typing something", "description"=>"and something else", "date"=>""} +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms) + + + +NameError (uninitialized constant TasksController::Book): + +app/controllers/tasks_controller.rb:13:in `create' +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-20 11:04:30 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (7.0ms) +Completed 200 OK in 24ms (Views: 20.3ms | ActiveRecord: 0.8ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-20 11:04:37 -0700 +Processing by TasksController#create as HTML + Parameters: {"authenticity_token"=>"T+i1zkFYHHwGsumG/05MsQgsmhx0JJvdQKdLGhvc4AAf0JYcDbNQzuQp6LyhkUzb7l35CBaaEQx8StVBb0L2iw==", "title"=>"Typing something", "description"=>"and something else", "date"=>""} +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms) + + + +NameError (uninitialized constant TasksController::Book): + +app/controllers/tasks_controller.rb:13:in `create' +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-20 11:04:51 -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 28ms (Views: 25.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-20 11:04:56 -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 24ms (Views: 21.1ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-20 11:05:08 -0700 +Processing by TasksController#create as HTML + Parameters: {"authenticity_token"=>"c2B22KwMejuPiD3IYDzQWUkWaMlVp+r3JmBP+80mz0wjWFUK4Oc2iW0TPPI+49Azr2cL3TcZYCYajdGgubjZxw==", "title"=>"Words", "description"=>"Words", "date"=>"2017-09-21"} +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms) + + + +NameError (uninitialized constant TasksController::Book): + +app/controllers/tasks_controller.rb:13:in `create' +Started POST "/tasks" for 127.0.0.1 at 2017-09-20 11:06:11 -0700 +Processing by TasksController#create as HTML + Parameters: {"authenticity_token"=>"c2B22KwMejuPiD3IYDzQWUkWaMlVp+r3JmBP+80mz0wjWFUK4Oc2iW0TPPI+49Azr2cL3TcZYCYajdGgubjZxw==", "title"=>"Words", "description"=>"Words", "date"=>"2017-09-21"} +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.0ms) + + + +NameError (uninitialized constant TasksController::Book): + +app/controllers/tasks_controller.rb:13:in `create' +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 11:06:21 -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 25ms (Views: 22.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-20 11:06:25 -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 17ms (Views: 15.3ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-20 11:06:37 -0700 +Processing by TasksController#create as HTML + Parameters: {"authenticity_token"=>"0yx4pishupXT0X34fNIVI+9FssE+zoHnVi2bA7OU5yODFFt0Z8r2JzFKfMIiDRVJCTTR1VxwCzZqwAVYxwrxqA==", "title"=>"This ", "description"=>"Then That", "date"=>"2017-09-29"} +Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.0ms) + + + +NameError (uninitialized constant TasksController::Book): + +app/controllers/tasks_controller.rb:13:in `create' +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-20 11:07:04 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (0.8ms) +Completed 200 OK in 17ms (Views: 15.5ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-20 11:07:15 -0700 +Processing by TasksController#create as HTML + Parameters: {"authenticity_token"=>"EfFH1Nd7oisEX+jnOnBhV19xcsU2e+c78wVS5PRCfhVByWQGm5DumebE6d1kr2E9uQAR0VTFberP6My/gNxong==", "title"=>"Get That", "description"=>"Or This", "date"=>"2017-09-21"} +  (0.1ms) begin transaction + SQL (1.0ms) INSERT INTO "tasks" ("title", "description", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "Get That"], ["description", "Or This"], ["date", "2017-09-21"], ["created_at", "2017-09-20 18:07:15.506367"], ["updated_at", "2017-09-20 18:07:15.506367"]] +  (0.9ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 17ms (ActiveRecord: 2.9ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 11:07: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 (1.6ms) +Completed 200 OK in 19ms (Views: 16.2ms | ActiveRecord: 0.2ms) + + From 6987e5bb2a1cb2f65f2c551eac5e7b520d28eade Mon Sep 17 00:00:00 2001 From: Amy Cash Date: Wed, 20 Sep 2017 13:30:54 -0700 Subject: [PATCH 04/12] reorganize routes and methods --- app/controllers/tasks_controller.rb | 25 +-- app/views/tasks/index.html.erb | 4 + app/views/tasks/show.html.erb | 4 + config/routes.rb | 27 ++- log/development.log | 265 ++++++++++++++++++++++++++++ 5 files changed, 309 insertions(+), 16 deletions(-) create mode 100644 app/views/tasks/show.html.erb diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 644c86106..abbf7cf31 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -6,28 +6,31 @@ def index def new #only cares about showing the form end - def edit_task - end - def create #hash access to user data, from the form, - a = Task.new(title: params[:title], description: params[:description], date: params[:date]) - a.save - redirect_to('/tasks') - # puts params # x = Task.new(title: "Ada" , description: "it's a name") - # puts x - # x.save - + task = Task.new(title: params[:title], description: params[:description], date: params[:date]) + #calls the form, in the first example, you create a new entry by adding the info yourself + #in the second example you use user input as the values -- + task.save #saves it + redirect_to('/tasks') + #return user to main page end def show + @task = Task.find(2) + + #@task = Task.find(params[:id]) + # @task = Task.find_by(params[:id]) + # title: params[:book_id] end def update end - def show + def edit_task end + def destroy + end end diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index b3cb36d3e..f847a900e 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -5,6 +5,10 @@ <%= "These are the breaks" %>

+

+ <%= link_to "Show Task 1", show_path(1) %> +

+
    <% @tasks.each do |task| %>
  • diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb new file mode 100644 index 000000000..ecaaecc00 --- /dev/null +++ b/app/views/tasks/show.html.erb @@ -0,0 +1,4 @@ +

    HELLO

    + +

    This is the show page

    +

    <%= @task.title %>

    diff --git a/config/routes.rb b/config/routes.rb index aea407a0c..d45b87597 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,20 +3,37 @@ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html +get '/tasks', to: 'tasks#index', as: 'index' + # get '/books', to: 'books#index', as: 'books' + # get '/puppies', to: 'puppies#index', at: 'puppies' + get '/tasks/new', to: 'tasks#new', as: 'new_task' -post '/tasks/new', to: 'tasks#new', as: 'add_task' + # get '/books/new', to: 'books#new', as: 'new_book' + #GETS the form to Update or Add Info, but doesn't do the update -get '/tasks', to: 'tasks#index', as: 'index' +post '/tasks', to: 'tasks#create' +# post '/books', to: 'books#create' +# post '/tasks/new', to: 'tasks#new', as: 'add_task' get '/tasks/:id/edit', to: 'tasks#edit', as: 'edit_task' + # get '/books/:id/edit', to: 'books#edit', as: 'edit_book' + +get '/tasks/:id', to: 'tasks#show', as: 'show' + # get '/books/:id', to: 'books#show', as: 'book' +# if youcall the show method, it finds whatever id you put in and then goes to the tasks/id route -post '/tasks', to: 'tasks#create', as: 'create_task' -get '/tasks/:id', to: 'tasks#show', as: 'show_task' +patch '/tasks:id', to: 'tasks#update' + # put '/books/:id', to: 'books#update' -patch '/tasks:id', to: 'tasks#update', as: 'update_task' delete '/tasks:id', to: 'tasks#destroy', as: 'delete' +# delete '/books/:id', to: 'books#destroy' +################ + # + # + # + # post '/books/:id/checkout', to: 'books#checkout', as: 'checkout_book' end diff --git a/log/development.log b/log/development.log index 9c05cfa3f..780b2dca5 100644 --- a/log/development.log +++ b/log/development.log @@ -1094,3 +1094,268 @@ Processing by TasksController#index as HTML Completed 200 OK in 19ms (Views: 16.2ms | ActiveRecord: 0.2ms) +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 12:14:30 -0700 +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +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 (10.6ms) +Completed 200 OK in 237ms (Views: 222.0ms | ActiveRecord: 1.2ms) + + +Started GET "/tasks/show" for 127.0.0.1 at 2017-09-20 12:14:35 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"show"} + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.4ms) +Completed 200 OK in 21ms (Views: 18.5ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/show" for 127.0.0.1 at 2017-09-20 12:16:58 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"show"} + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (5.0ms) +Completed 500 Internal Server Error in 12ms + + + +ActionView::Template::Error (undefined method `title' for nil:NilClass): + 1:

    HELLO

    + 2: + 3:

    <%= @task.title %>

    + +app/views/tasks/show.html.erb:3:in `_app_views_tasks_show_html_erb__2022176416911152128_70181010700620' +Started GET "/tasks/show" for 127.0.0.1 at 2017-09-20 12:17:28 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"show"} + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (3.5ms) +Completed 500 Internal Server Error in 10ms + + + +ActionView::Template::Error (undefined method `title' for nil:NilClass): + 1:

    HELLO

    + 2: + 3:

    <%= @task.title %>

    + +app/views/tasks/show.html.erb:3:in `_app_views_tasks_show_html_erb__2022176416911152128_70181045619320' +Started GET "/tasks/show" for 127.0.0.1 at 2017-09-20 12:19:18 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"show"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 0], ["LIMIT", 1]] +Completed 404 Not Found in 10ms (ActiveRecord: 1.6ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=show): + +app/controllers/tasks_controller.rb:24:in `show' +Started GET "/tasks/show" for 127.0.0.1 at 2017-09-20 12:19:39 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"show"} + Task Load (0.5ms) 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.4ms) +Completed 200 OK in 32ms (Views: 19.9ms | ActiveRecord: 1.3ms) + + +Started GET "/tasks/show" for 127.0.0.1 at 2017-09-20 12:19:50 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"show"} + 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.4ms) +Completed 200 OK in 23ms (Views: 13.0ms | ActiveRecord: 0.8ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 12:22:34 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (7.2ms) +Completed 200 OK in 27ms (Views: 23.1ms | ActiveRecord: 0.9ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-20 12:22:36 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.2ms) 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.4ms) +Completed 200 OK in 28ms (Views: 23.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/show" for 127.0.0.1 at 2017-09-20 12:23:38 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"show"} + 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'=show): + +app/controllers/tasks_controller.rb:23:in `show' +Started GET "/tasks/show/1" for 127.0.0.1 at 2017-09-20 12:23:42 -0700 + +ActionController::RoutingError (No route matches [GET] "/tasks/show/1"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/tasks/show/1" for 127.0.0.1 at 2017-09-20 12:25:35 -0700 + +ActionController::RoutingError (No route matches [GET] "/tasks/show/1"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-20 12:25:39 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.3ms) 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.4ms) +Completed 200 OK in 40ms (Views: 21.7ms | ActiveRecord: 1.4ms) + + +Started GET "/tasks/2" for 127.0.0.1 at 2017-09-20 12:25:49 -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.4ms) +Completed 200 OK in 23ms (Views: 20.3ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-20 13:28:20 -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.4ms) +Completed 200 OK in 37ms (Views: 23.7ms | ActiveRecord: 0.9ms) + + +Started GET "/tasks/2" for 127.0.0.1 at 2017-09-20 13:28:24 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.3ms) 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.4ms) +Completed 200 OK in 19ms (Views: 15.7ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-20 13:28:32 -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 20ms (Views: 16.3ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-20 13:28: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 (2.4ms) +Completed 200 OK in 23ms (Views: 19.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 13:28:46 -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 21ms (Views: 18.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/id" for 127.0.0.1 at 2017-09-20 13:28:54 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"id"} + 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'=id): + +app/controllers/tasks_controller.rb:25:in `show' +Started GET "/tasks/4" for 127.0.0.1 at 2017-09-20 13:28:58 -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]] +Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=4): + +app/controllers/tasks_controller.rb:25:in `show' +Started GET "/tasks/3" for 127.0.0.1 at 2017-09-20 13:29:03 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"3"} + Task Load (0.2ms) 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.4ms) +Completed 200 OK in 25ms (Views: 22.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/3" for 127.0.0.1 at 2017-09-20 13:30:21 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"3"} + 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.4ms) +Completed 200 OK in 32ms (Views: 20.7ms | ActiveRecord: 1.1ms) + + From 9b23c8f68ce1945bdd00d778597a6788cbda7806 Mon Sep 17 00:00:00 2001 From: Amy Cash Date: Wed, 20 Sep 2017 16:00:10 -0700 Subject: [PATCH 05/12] Format Index Page --- app/assets/stylesheets/tasks.scss | 22 ++ app/controllers/tasks_controller.rb | 2 +- app/views/layouts/application.html.erb | 2 +- app/views/tasks/index.html.erb | 18 +- app/views/tasks/new.html.erb | 2 +- app/views/tasks/show.html.erb | 5 +- db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 372 +++++++++++++++++++++++++ 8 files changed, 408 insertions(+), 15 deletions(-) diff --git a/app/assets/stylesheets/tasks.scss b/app/assets/stylesheets/tasks.scss index 91c650bf4..b17aeb229 100644 --- a/app/assets/stylesheets/tasks.scss +++ b/app/assets/stylesheets/tasks.scss @@ -11,3 +11,25 @@ input { font-family: helvetica; font-size: 24px; } + +h1 { + text-align: center; +} + +h3 { + border: 1px solid green; + text-align: center; +} + +.task-links { + // list-style: none; + border: 1px solid red; +} + +.task-data { + border: 1px solid blue; +} + +li { + +} diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index abbf7cf31..a8fea6088 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -18,7 +18,7 @@ def create #hash access to user data, from the form, def show @task = Task.find(2) - + #@task = Task.find(params[:id]) # @task = Task.find_by(params[:id]) # title: params[:book_id] diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 7a592d922..8420f2026 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -9,7 +9,7 @@
    -

    This is a test to see how this works

    +

    Welcome to my List of Many Tasks: This is stuff that will be included on ever page because it's in the Header of the LayOut.

    diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index f847a900e..7c1c74ef3 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -1,18 +1,14 @@ -

    Tasks#index

    -

    Find me in app/views/tasks/index.html.erb

    +

    Tasks I Probably Won't Do

    -

    - <%= "These are the breaks" %> -

    +

    + <%= "To-Do" %> +

    -

    - <%= link_to "Show Task 1", show_path(1) %> -

    -
      - <% @tasks.each do |task| %> +
        + <% @tasks.each_with_index do |task, index| %>
      • - <%= "#{task[:title]}: #{task[:description]} due date: #{task[:date]}" %> + <%= link_to "#{task[:title]}", show_path(index + 1) %>
      • <% end %>
      diff --git a/app/views/tasks/new.html.erb b/app/views/tasks/new.html.erb index 8d6d52eb3..9707bf329 100644 --- a/app/views/tasks/new.html.erb +++ b/app/views/tasks/new.html.erb @@ -1,5 +1,5 @@

      - This is the new page + This is the new page. It is for new things.

      diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb index ecaaecc00..0869ea124 100644 --- a/app/views/tasks/show.html.erb +++ b/app/views/tasks/show.html.erb @@ -1,4 +1,7 @@

      HELLO

      This is the show page

      -

      <%= @task.title %>

      + +

      <%= @task.title %>

      +

      <%= @task.description %>

      +

      <%= @task.date %>

      diff --git a/db/development.sqlite3 b/db/development.sqlite3 index 947e49e48dba7985f747e9c7e69ad43fc1e62c21..a2aadd05543f04d7e16853c6aec83bb2e689d18e 100644 GIT binary patch delta 148 zcmZp8z}WDBae_1>=R_H2M$U~1OZ<6Q_}Urx=kmMoz2j@&EGSUUm!8VP&Y*6r=;-L2 zk(yeZs^FSfl9`tdBoz`Ba`H$3z)tMvjdMOZ>T*`Q9<`&*gXFd$(Co-~r#}cX5J(jLZNkbPZns diff --git a/log/development.log b/log/development.log index 780b2dca5..f46e1c7e4 100644 --- a/log/development.log +++ b/log/development.log @@ -1359,3 +1359,375 @@ Processing by TasksController#show as HTML Completed 200 OK in 32ms (Views: 20.7ms | ActiveRecord: 1.1ms) +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 14:58:46 -0700 +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (11.3ms) +Completed 200 OK in 236ms (Views: 223.3ms | ActiveRecord: 1.3ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-20 14:59:01 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.2ms) 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.6ms) +Completed 200 OK in 30ms (Views: 22.2ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-20 14:59: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.4ms) +Completed 200 OK in 16ms (Views: 14.5ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-20 14:59:56 -0700 +Processing by TasksController#create as HTML + Parameters: {"authenticity_token"=>"g4rkFmG4/ucJIf8XDpxA19yod+QX5ZgNC60HnTVoGU/TssfELVOyVeu6/i1QQ0C9OtkU8HVbEtw3QJnGQfYPxA==", "title"=>"Cheese Eating", "description"=>"Eat a lot of Cheese", "date"=>"2017-09-21"} +  (0.1ms) begin transaction + SQL (0.9ms) INSERT INTO "tasks" ("title", "description", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "Cheese Eating"], ["description", "Eat a lot of Cheese"], ["date", "2017-09-21"], ["created_at", "2017-09-20 21:59:56.455170"], ["updated_at", "2017-09-20 21:59:56.455170"]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 2.1ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 14:59: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.6ms) +Completed 200 OK in 30ms (Views: 26.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:02:35 -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.0ms) +Completed 200 OK in 20ms (Views: 16.0ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/2" for 127.0.0.1 at 2017-09-20 15:02:38 -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 (1.1ms) +Completed 200 OK in 30ms (Views: 27.5ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/3" for 127.0.0.1 at 2017-09-20 15:02:41 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"3"} + Task Load (0.2ms) 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.5ms) +Completed 200 OK in 27ms (Views: 22.4ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:04: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.0ms) +Completed 200 OK in 23ms (Views: 19.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-20 15:05:15 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.2ms) 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.5ms) +Completed 200 OK in 19ms (Views: 16.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-20 15:06:21 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.3ms) 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.7ms) +Completed 200 OK in 20ms (Views: 16.8ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:10:03 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.8ms) +Completed 500 Internal Server Error in 7ms (ActiveRecord: 0.0ms) + + + +SyntaxError (/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/index.html.erb:11: syntax error, unexpected ',', expecting ')' +tput_buffer.append=( "Task 1", show_path(1) );@output_buffer + ^ +/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/index.html.erb:15: syntax error, unexpected ',', expecting ')' +tput_buffer.append=( "Task 2", show_path(2) );@output_buffer + ^ +/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/index.html.erb:19: syntax error, unexpected ',', expecting ')' +tput_buffer.append=( "Task 3", show_path(3) );@output_buffer + ^): + +app/views/tasks/index.html.erb:11: syntax error, unexpected ',', expecting ')' +app/views/tasks/index.html.erb:15: syntax error, unexpected ',', expecting ')' +app/views/tasks/index.html.erb:19: syntax error, unexpected ',', expecting ')' +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:10:33 -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 21ms (Views: 16.8ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:38:38 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (7.8ms) +Completed 200 OK in 44ms (Views: 41.4ms | ActiveRecord: 0.9ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-20 15:38:48 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.3ms) 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.7ms) +Completed 200 OK in 19ms (Views: 15.1ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:40:04 -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.6ms) +Completed 200 OK in 31ms (Views: 27.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:42: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 (1.6ms) +Completed 200 OK in 35ms (Views: 32.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:42: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.0ms) +Completed 200 OK in 27ms (Views: 23.9ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:44: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.5ms) +Completed 200 OK in 38ms (Views: 35.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:44: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.0ms) +Completed 200 OK in 20ms (Views: 18.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-20 15:44:15 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"1"} + Task Load (0.2ms) 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.4ms) +Completed 200 OK in 21ms (Views: 18.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:44: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 (1.5ms) +Completed 200 OK in 33ms (Views: 30.8ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:47:28 -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 500 Internal Server Error in 23ms (ActiveRecord: 0.2ms) + + + +ActionView::Template::Error (Invalid CSS after "...1px solid green": expected ";", was ":"): + 4: TaskList + 5: <%= csrf_meta_tags %> + 6: + 7: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> + 8: <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> + 9: + 10: + +app/assets/stylesheets/tasks.scss:16 +app/views/layouts/application.html.erb:7:in `_app_views_layouts_application_html_erb___4156669649140352696_70161404865940' +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:47: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 (1.5ms) +Completed 200 OK in 37ms (Views: 34.4ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:48:02 -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.5ms) +Completed 200 OK in 19ms (Views: 15.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:49:11 -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 500 Internal Server Error in 9ms (ActiveRecord: 0.0ms) + + + +SyntaxError (/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/index.html.erb:26: syntax error, unexpected tIDENTIFIER, expecting tSTRING_DEND +k_to "#{task[:title] show_path(:id)}" );@output_buffer.safe_ + ^): + +app/views/tasks/index.html.erb:26: syntax error, unexpected tIDENTIFIER, expecting tSTRING_DEND +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:51:19 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + Rendered tasks/index.html.erb within layouts/application (212.5ms) +Completed 500 Internal Server Error in 221ms (ActiveRecord: 0.3ms) + + + +ActionView::Template::Error (undefined local variable or method `task' for #<#:0x007f9f76cb0670> +Did you mean? @tasks): + 1:

      Tasks I Probably Won't Do

      + 2: + 4: + 5:

      + 6: <%= "To-Do" %> + +app/views/tasks/index.html.erb:3:in `_app_views_tasks_index_html_erb__2416058239587445607_70161434773540' +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:52:03 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + CACHE Task Load (0.0ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + Rendered tasks/index.html.erb within layouts/application (241.8ms) +Completed 500 Internal Server Error in 251ms (ActiveRecord: 0.3ms) + + + +ActionView::Template::Error (undefined local variable or method `task' for #<#:0x007f9f77993a40> +Did you mean? @tasks): + 1:

      Tasks I Probably Won't Do

      + 2: + 4: + 5:

      + 6: <%= "To-Do" %> + +app/views/tasks/index.html.erb:3:in `_app_views_tasks_index_html_erb__2416058239587445607_70161441360300' +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:53:53 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Rendered tasks/index.html.erb within layouts/application (0.8ms) +Completed 200 OK in 25ms (Views: 21.9ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:54:52 -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: 16.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:55:37 -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.4ms) +Completed 200 OK in 40ms (Views: 36.9ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:56:04 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.9ms) +Completed 200 OK in 22ms (Views: 18.1ms | ActiveRecord: 0.5ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:56: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.8ms) +Completed 200 OK in 36ms (Views: 32.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:57:22 -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 22ms (Views: 19.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-20 15:57: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 (2.3ms) +Completed 200 OK in 37ms (Views: 32.7ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/3" for 127.0.0.1 at 2017-09-20 15:57:45 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"3"} + Task Load (0.3ms) 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.7ms) +Completed 200 OK in 44ms (Views: 34.4ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/4" for 127.0.0.1 at 2017-09-20 15:58:37 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"4"} + Task Load (0.3ms) 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.7ms) +Completed 200 OK in 30ms (Views: 25.5ms | ActiveRecord: 0.3ms) + + From a9d4185f06f95fbe216b82ec5da6b5e3e6604d39 Mon Sep 17 00:00:00 2001 From: Amy Cash Date: Thu, 21 Sep 2017 20:27:33 -0700 Subject: [PATCH 06/12] Fix Form Tag --- app/controllers/tasks_controller.rb | 5 +- app/views/tasks/edit.html.erb | 1 + app/views/tasks/new.html.erb | 21 +- app/views/tasks/show.html.erb | 1 + config/routes.rb | 2 +- db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 995 ++++++++++++++++++++++++++++ 7 files changed, 1017 insertions(+), 8 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 a8fea6088..a0d0da0a6 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -8,7 +8,7 @@ def new #only cares about showing the form def create #hash access to user data, from the form, # x = Task.new(title: "Ada" , description: "it's a name") - task = Task.new(title: params[:title], description: params[:description], date: params[:date]) + task = Task.new(title: params[:task][:title], description: params[:task][:description], date: params[:task][:date]) #calls the form, in the first example, you create a new entry by adding the info yourself #in the second example you use user input as the values -- task.save #saves it @@ -17,7 +17,7 @@ def create #hash access to user data, from the form, end def show - @task = Task.find(2) + @task = Task.find(params[:id]) #@task = Task.find(params[:id]) # @task = Task.find_by(params[:id]) @@ -28,6 +28,7 @@ def update end def edit_task + @task = Task.find(params[:id]) end def destroy diff --git a/app/views/tasks/edit.html.erb b/app/views/tasks/edit.html.erb new file mode 100644 index 000000000..efb813c09 --- /dev/null +++ b/app/views/tasks/edit.html.erb @@ -0,0 +1 @@ +

      This is the edit page

      diff --git a/app/views/tasks/new.html.erb b/app/views/tasks/new.html.erb index 9707bf329..439daef03 100644 --- a/app/views/tasks/new.html.erb +++ b/app/views/tasks/new.html.erb @@ -2,13 +2,11 @@ This is the new page. It is for new things.

      - + - - + + +<%= form_tag ('/tasks') do %> +<%= label_tag "task[title]", "TASK NAME" %> +<%= text_field_tag "task[title]" %> + +<%= label_tag "task[description]", "TASK DESCRIPTION" %> +<%= text_field_tag "task[description]" %> + +<%= label_tag "task[date]", "DATE" %> +<%= date_field_tag "task[date]" %> + +<%= submit_tag "Press This Button" %> +<% end %> diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb index 0869ea124..5c6369fe6 100644 --- a/app/views/tasks/show.html.erb +++ b/app/views/tasks/show.html.erb @@ -5,3 +5,4 @@

      <%= @task.title %>

      <%= @task.description %>

      <%= @task.date %>

      + diff --git a/config/routes.rb b/config/routes.rb index d45b87597..da6a48635 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -11,7 +11,7 @@ # get '/books/new', to: 'books#new', as: 'new_book' #GETS the form to Update or Add Info, but doesn't do the update -post '/tasks', to: 'tasks#create' +post '/tasks', to: 'tasks#create' # post '/books', to: 'books#create' # post '/tasks/new', to: 'tasks#new', as: 'add_task' diff --git a/db/development.sqlite3 b/db/development.sqlite3 index a2aadd05543f04d7e16853c6aec83bb2e689d18e..1d17f2d347ad4c2bc9c1d2e8366ecf5efa55eede 100644 GIT binary patch delta 989 zcmZ{jF-zn?6vvZ7qr1tjTd0LsWQ(&oGR(Z0NivfvC_x|&LnSU-`%!?QEdd*z9`LFZHFP|I9e#bJFzjx!fKN$@57cdDt zEIiCUD*zW$34z2uB7~EWd`)^wmeDno?9b8J z)mBDR#nfccCWAMz&L*EH|K|r>oz8J7(uUg>280 delta 44 zcmZp8z}WDBae_1>=R_H2M$U~1OZ<6Q_}Urx=kmMoz2j@&EGSUUx4Av8LXeRK05~=c ADgXcg diff --git a/log/development.log b/log/development.log index f46e1c7e4..4fa17c9b5 100644 --- a/log/development.log +++ b/log/development.log @@ -1731,3 +1731,998 @@ Processing by TasksController#show as HTML Completed 200 OK in 30ms (Views: 25.5ms | ActiveRecord: 0.3ms) +Started GET "/" for 127.0.0.1 at 2017-09-21 09:02:26 -0700 +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +Processing by Rails::WelcomeController#index as HTML + Rendering /Users/amymcash/.rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb + Rendered /Users/amymcash/.rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb (4.1ms) +Completed 200 OK in 25ms (Views: 11.3ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 09:02:32 -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 246ms (Views: 242.4ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/1/edit" for 127.0.0.1 at 2017-09-21 09:04:24 -0700 + +AbstractController::ActionNotFound (The action 'edit' could not be found for TasksController): + +actionpack (5.1.4) lib/abstract_controller/base.rb:119:in `process' +actionview (5.1.4) lib/action_view/rendering.rb:30:in `process' +actionpack (5.1.4) lib/action_controller/metal.rb:189:in `dispatch' +actionpack (5.1.4) lib/action_controller/metal.rb:253:in `dispatch' +actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:49:in `dispatch' +actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:31:in `serve' +actionpack (5.1.4) lib/action_dispatch/journey/router.rb:50:in `block in serve' +actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `each' +actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `serve' +actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:834:in `call' +rack (2.0.3) lib/rack/etag.rb:25:in `call' +rack (2.0.3) lib/rack/conditional_get.rb:25:in `call' +rack (2.0.3) lib/rack/head.rb:12:in `call' +rack (2.0.3) lib/rack/session/abstract/id.rb:232:in `context' +rack (2.0.3) lib/rack/session/abstract/id.rb:226:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/cookies.rb:613:in `call' +activerecord (5.1.4) lib/active_record/migration.rb:556:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/callbacks.rb:26:in `block in call' +activesupport (5.1.4) lib/active_support/callbacks.rb:97:in `run_callbacks' +actionpack (5.1.4) lib/action_dispatch/middleware/callbacks.rb:24:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/tasks/3" for 127.0.0.1 at 2017-09-21 09:06:38 -0700 +Processing by TasksController#show as HTML +Started GET "/tasks/3" for 127.0.0.1 at 2017-09-21 09:06:48 -0700 + Parameters: {"id"=>"3"} + Task Load (0.6ms) 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 (2.8ms) +Completed 200 OK in 44ms (Views: 25.6ms | ActiveRecord: 1.5ms) + + +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.2ms) +Completed 200 OK in 25ms (Views: 14.0ms | ActiveRecord: 0.8ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-21 09:06:57 -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.6ms) +Completed 200 OK in 19ms (Views: 15.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/2" for 127.0.0.1 at 2017-09-21 09:07:03 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.2ms) 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.5ms) +Completed 200 OK in 22ms (Views: 17.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 09:07: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.2ms) +Completed 200 OK in 22ms (Views: 17.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/4" for 127.0.0.1 at 2017-09-21 09:07:41 -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.2ms) +Completed 200 OK in 29ms (Views: 23.7ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-21 09:07:44 -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.9ms) +Completed 200 OK in 29ms (Views: 24.4ms | ActiveRecord: 0.2ms) + + +Started GET "/1" for 127.0.0.1 at 2017-09-21 09:12:08 -0700 + +ActionController::RoutingError (No route matches [GET] "/1"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/1/edit" for 127.0.0.1 at 2017-09-21 09:12:42 -0700 + +ActionController::RoutingError (No route matches [GET] "/1/edit"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/1/edit" for 127.0.0.1 at 2017-09-21 09:15:18 -0700 + +ActionController::RoutingError (No route matches [GET] "/1/edit"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/1/edit" for 127.0.0.1 at 2017-09-21 09:15:20 -0700 + +ActionController::RoutingError (No route matches [GET] "/1/edit"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/edit" for 127.0.0.1 at 2017-09-21 09:15:25 -0700 + +ActionController::RoutingError (No route matches [GET] "/edit"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 09:16: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 (9.8ms) +Completed 200 OK in 44ms (Views: 37.6ms | ActiveRecord: 1.3ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-21 09:16:36 -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.3ms) +Completed 200 OK in 31ms (Views: 24.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 09:17:06 -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 19ms (Views: 15.9ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 09:17:13 -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.5ms) +Completed 200 OK in 44ms (Views: 40.8ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/3" for 127.0.0.1 at 2017-09-21 09:17:15 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"3"} + Task Load (0.2ms) 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.6ms) +Completed 200 OK in 31ms (Views: 25.8ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 19:25:24 -0700 +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (9.8ms) +Completed 200 OK in 218ms (Views: 205.5ms | ActiveRecord: 1.2ms) + + +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 19:26:30 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (2.0ms) +Completed 200 OK in 31ms (Views: 25.0ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 19:26:33 -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.7ms) +Completed 200 OK in 29ms (Views: 23.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-21 19:27:22 -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 (2.3ms) +Completed 200 OK in 42ms (Views: 32.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/2" for 127.0.0.1 at 2017-09-21 19:27:37 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (1.2ms) 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 28ms (Views: 23.5ms | ActiveRecord: 1.2ms) + + +Started GET "/tasks/4" for 127.0.0.1 at 2017-09-21 19:28:59 -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.6ms) +Completed 200 OK in 29ms (Views: 23.4ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 19:29:06 -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: 19.2ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 19:29:29 -0700 +Processing by TasksController#create as HTML + Parameters: {"authenticity_token"=>"BTuTs03mavWS9lagB5mbPpR/mLTwk09nSdVi1q78ZUKKhx5QccegDV8nl4f3+/w5PYVEPUAge0J3vkPXmBpD8A==", "title"=>"Finish Task List", "description"=>"Project for Ada", "date"=>"2017-10-02"} +  (0.2ms) begin transaction + SQL (0.8ms) INSERT INTO "tasks" ("title", "description", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "Finish Task List"], ["description", "Project for Ada"], ["date", "2017-10-02"], ["created_at", "2017-09-22 02:29:29.652735"], ["updated_at", "2017-09-22 02:29:29.652735"]] +  (1.3ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 2.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 19:29: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 (1.5ms) +Completed 200 OK in 20ms (Views: 16.9ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/5" for 127.0.0.1 at 2017-09-21 19:29:31 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"5"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 5], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 28ms (Views: 22.3ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 19:41:34 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.2ms) +Completed 200 OK in 27ms (Views: 23.2ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 19:41:54 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"ENOlmgCX7kL28n7ytaGJD8qOtQFpffutJosW50xjItKfbyh5PLYkujsjv9VFw+4IY3RpiNnOz4gY4DfmeoUEYA==", "task"=>{"title"=>"Practice with Form Helpers", "Description"=>"PRACTICE!"}, "commit"=>"Add Task"} +  (0.1ms) begin transaction + SQL (0.4ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2017-09-22 02:41:54.338120"], ["updated_at", "2017-09-22 02:41:54.338120"]] +  (1.0ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.5ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 19:41: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.3ms) +Completed 200 OK in 22ms (Views: 18.6ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 19:42:05 -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 (9.8ms) +Completed 200 OK in 35ms (Views: 29.7ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/6" for 127.0.0.1 at 2017-09-21 19:42:13 -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 (0.4ms) +Completed 200 OK in 21ms (Views: 17.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/6" for 127.0.0.1 at 2017-09-21 19:43:59 -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 (0.5ms) +Completed 200 OK in 32ms (Views: 27.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 19:44:01 -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 24ms (Views: 19.3ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 19:44:06 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (2.0ms) +Completed 200 OK in 36ms (Views: 30.1ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 19:45:09 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.1ms) +Completed 200 OK in 22ms (Views: 18.9ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 19:45:11 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.4ms) +Completed 200 OK in 21ms (Views: 18.0ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-21 19:45: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.7ms) +Completed 200 OK in 31ms (Views: 24.8ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 19:48:46 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.1ms) +Completed 200 OK in 20ms (Views: 17.2ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 19:48:51 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"343GOg/4Mck5WdVRg1umFS+BTYxXMiiKKRsQS6aE0nlQMUvZM9n7MfSIFHZzOcEShnuRBeeBHK8XcDFKkGL0yw==", "task"=>{"title"=>"12", "Description"=>"12", "date"=>"12"}, "commit"=>"Add Task"} +  (0.1ms) begin transaction + SQL (0.4ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2017-09-22 02:48:51.704245"], ["updated_at", "2017-09-22 02:48:51.704245"]] +  (1.0ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 16ms (ActiveRecord: 2.5ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 19:48:51 -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 22ms (Views: 17.9ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/5" for 127.0.0.1 at 2017-09-21 19:48:55 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"5"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 5], ["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: 26.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/7" for 127.0.0.1 at 2017-09-21 19:48:59 -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.6ms) +Completed 200 OK in 24ms (Views: 19.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 19:49:49 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.0ms) +Completed 200 OK in 19ms (Views: 16.0ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 19:52:26 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.4ms) +Completed 200 OK in 27ms (Views: 22.4ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 19:52:44 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"9MV2nSnfoqVIHKfZmOQ065gvfHV4OU9ZdZJMO1OWEgZ7eft+Ff5oXYXNZv5ohlPsMdWg/MiKe3xL+W06ZXA0tA==", "task"=>{"title"=>"More of This", "Description"=>"Do Be Do", "date"=>"2017-09-30"}, "commit"=>"Add Task"} +  (0.1ms) begin transaction + SQL (0.4ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2017-09-22 02:52:44.822696"], ["updated_at", "2017-09-22 02:52:44.822696"]] +  (1.0ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.6ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 19:52:44 -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 30ms (Views: 26.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-21 19:54:35 -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 34ms (Views: 28.3ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 20:03:11 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.0ms) +Completed 200 OK in 20ms (Views: 17.7ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 20:03:13 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.1ms) +Completed 200 OK in 21ms (Views: 17.7ms) + + +Started POST "/tasks/tasks_create_path" for 127.0.0.1 at 2017-09-21 20:03:19 -0700 + +ActionController::RoutingError (No route matches [POST] "/tasks/tasks_create_path"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 20:04:07 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.1ms) +Completed 200 OK in 21ms (Views: 18.4ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 20:04:21 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"d52a9OrZhE69taCP38ltY9wLQWGRkv+C4fUsrV1QBkv4IRcX1vhOtnBkYagvqwpkdfGd6CEhy6ffng2sa7Yg+Q==", "task"=>{"title"=>"Eat", "Description"=>"Food", "date"=>"2017-09-22"}, "commit"=>"Add Task"} +  (0.1ms) begin transaction + SQL (0.5ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2017-09-22 03:04:21.385008"], ["updated_at", "2017-09-22 03:04:21.385008"]] +  (1.1ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 16ms (ActiveRecord: 2.6ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 20:04:21 -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 21ms (Views: 17.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 20:04:47 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.0ms) +Completed 200 OK in 23ms (Views: 20.4ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks/task_create_path" for 127.0.0.1 at 2017-09-21 20:04:53 -0700 + +ActionController::RoutingError (No route matches [POST] "/tasks/task_create_path"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started POST "/tasks/task_create_path" for 127.0.0.1 at 2017-09-21 20:05:40 -0700 + +ActionController::RoutingError (No route matches [POST] "/tasks/task_create_path"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 20:06:31 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.1ms) +Completed 200 OK in 19ms (Views: 16.1ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 20:06:39 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"NP9GSxYgfvM2GSxW0+Ujm/WRCs8j1SZKuIqHD8txjZK7Q8uoKgG0C/vI7XEjh0ScXGvWRpNmEm+G4aYO/ZerIA==", "task"=>{"title"=>"New", "Description"=>"New", "date"=>"2017-09-28"}, "commit"=>"Add Task"} +  (0.1ms) begin transaction + SQL (0.4ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2017-09-22 03:06:39.764863"], ["updated_at", "2017-09-22 03:06:39.764863"]] +  (2.0ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 17ms (ActiveRecord: 3.5ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 20:06: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 (1.9ms) +Completed 200 OK in 21ms (Views: 18.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 20:08:49 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.2ms) +Completed 200 OK in 20ms (Views: 16.7ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 20:08:59 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"jhpsMILE9BNpoxko1nRPLFVpyXGPa1HOpum6B1aUlXwBpuHTvuU+66Ry2A8mFigr/JMV+D/YZeuYgpsGYHKzzg==", "task"=>{"title"=>"Thing", "Description"=>"Thing", "date"=>"2017-10-19"}, "commit"=>"Add Task"} +  (0.1ms) begin transaction + SQL (0.5ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2017-09-22 03:08:59.631935"], ["updated_at", "2017-09-22 03:08:59.631935"]] +  (0.9ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.5ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 20:08:59 -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 25ms (Views: 19.4ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/5" for 127.0.0.1 at 2017-09-21 20:09:04 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"5"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 5], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.0ms) +Completed 200 OK in 33ms (Views: 26.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/8" for 127.0.0.1 at 2017-09-21 20:09:08 -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.6ms) +Completed 200 OK in 28ms (Views: 22.4ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 20:14:16 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (0.9ms) +Completed 200 OK in 23ms (Views: 18.7ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 20:14:22 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"2D7iRZ9MW8PDGeqSQtCJtaFx45tZ3Sv3df+qqaf3lRRXgm+mo22ROw7IK7Wysu6yCIs/EuluH9JLlIuokRGzpg==", "task"=>{"title"=>"asdf", "Description"=>"asdf", "date"=>"2017-09-27"}, "commit"=>"Add Task"} +  (0.1ms) begin transaction + SQL (0.7ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2017-09-22 03:14:22.724555"], ["updated_at", "2017-09-22 03:14:22.724555"]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 2.0ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 20:14:22 -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 22ms (Views: 18.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 20:15:32 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.0ms) +Completed 200 OK in 22ms (Views: 18.3ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 20:15:42 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"Eb52dCdW2gLeoyn1omRyVL+P9nFkoH7bvub9hjtatVOeAvuXG3cQ+hNy6NJSBhVTFnUq+NQTSv6AjdyHDbyT4Q==", "task"=>{"title"=>"Test", "Description"=>"Testing", "date"=>"2017-10-24"}, "commit"=>"Add Task"} +  (0.1ms) begin transaction + SQL (0.6ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2017-09-22 03:15:42.230175"], ["updated_at", "2017-09-22 03:15:42.230175"]] +  (1.4ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 2.1ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 20:15:42 -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 25ms (Views: 21.9ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/5" for 127.0.0.1 at 2017-09-21 20:15:45 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"5"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 5], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 34ms (Views: 28.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 20:16:41 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (0.9ms) +Completed 200 OK in 27ms (Views: 24.0ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 20:16:49 -0700 +Processing by TasksController#create as HTML + Parameters: {"authenticity_token"=>"hc3pxK1JFhc3AdOpCu/lg6Pm4hokd2CyC03vko8WrjQKcWQnkWjc7/rQEo76jYKEChw+k5TEVJc1Js6TufCIhg==", "title"=>"asdf", "description"=>"asdf", "date"=>"2017-09-25"} +  (0.1ms) begin transaction + SQL (0.5ms) INSERT INTO "tasks" ("title", "description", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "asdf"], ["description", "asdf"], ["date", "2017-09-25"], ["created_at", "2017-09-22 03:16:49.291403"], ["updated_at", "2017-09-22 03:16:49.291403"]] +  (1.0ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.6ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 20:16:49 -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 23ms (Views: 19.0ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/14" for 127.0.0.1 at 2017-09-21 20:16:52 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"14"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 14], ["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: 26.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 20:23:24 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.0ms) +Completed 200 OK in 19ms (Views: 16.8ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 20:23:31 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"kJ8ZGnMjry5fUNQMUeMbPBMtunJukE2T4QRQiRHBKXMfI5T5TwJl1pKBFSuhgXw7utdm+94jebbfb3GIJycPwQ==", "task"=>{"title"=>"asdf", "Description"=>"asdf", "date"=>"2017-09-29"}, "commit"=>"Press This Button"} +  (0.1ms) begin transaction + SQL (0.4ms) INSERT INTO "tasks" ("title", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "asdf"], ["date", "2017-09-29"], ["created_at", "2017-09-22 03:23:31.052759"], ["updated_at", "2017-09-22 03:23:31.052759"]] +  (0.9ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 18ms (ActiveRecord: 2.9ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 20:23:31 -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 23ms (Views: 20.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/15" for 127.0.0.1 at 2017-09-21 20:23:33 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"15"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 15], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 34ms (Views: 27.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 20:23:43 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.0ms) +Completed 200 OK in 19ms (Views: 16.8ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 20:24:11 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"0FO5focs3yZB7dG61zb5CWvIGKRtNCzvdEpj3XB2KnBf7zSduw0V3ow8EJ0nVJ4OwjLELd2HGMpKIULcRpAMwg==", "task"=>{"title"=>"Finsh Task", "Description"=>"Speeling", "date"=>"2017-09-26"}, "commit"=>"Press This Button"} +  (0.1ms) begin transaction + SQL (0.5ms) INSERT INTO "tasks" ("title", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "Finsh Task"], ["date", "2017-09-26"], ["created_at", "2017-09-22 03:24:11.359227"], ["updated_at", "2017-09-22 03:24:11.359227"]] +  (1.3ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.9ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 20:24: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.0ms) +Completed 200 OK in 23ms (Views: 19.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/16" for 127.0.0.1 at 2017-09-21 20:24:13 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"16"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 16], ["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: 26.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-21 20:24:22 -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 35ms (Views: 28.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 20:26:56 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.0ms) +Completed 200 OK in 20ms (Views: 17.1ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 20:27:06 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"8w5KBZXSv4I+MFtUVEcH6bnJxWnzx4iqsbg8TgqA6KB8ssfmqfN1evPhmnOkJWDuEDMZ4EN0vI+P0x1PPGbOEg==", "task"=>{"title"=>"asdf", "description"=>"asdfasdfasdf", "date"=>"2017-09-04"}, "commit"=>"Press This Button"} +  (0.1ms) begin transaction + SQL (0.5ms) INSERT INTO "tasks" ("title", "description", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "asdf"], ["description", "asdfasdfasdf"], ["date", "2017-09-04"], ["created_at", "2017-09-22 03:27:06.115181"], ["updated_at", "2017-09-22 03:27:06.115181"]] +  (1.8ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 2.4ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 20:27:06 -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.6ms) +Completed 200 OK in 35ms (Views: 30.3ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/17" for 127.0.0.1 at 2017-09-21 20:27:08 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"17"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 17], ["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: 26.1ms | ActiveRecord: 0.1ms) + + From e28ac774216084dd06911e557c20f803db12e97f Mon Sep 17 00:00:00 2001 From: Amy Cash Date: Thu, 21 Sep 2017 22:34:13 -0700 Subject: [PATCH 07/12] Trying to make edit form --- app/controllers/tasks_controller.rb | 11 +- app/views/tasks/edit.html.erb | 22 + app/views/tasks/index.html.erb | 1 + app/views/tasks/new.html.erb | 19 +- config/routes.rb | 42 +- db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 1233 +++++++++++++++++++++++++++ 7 files changed, 1302 insertions(+), 26 deletions(-) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index a0d0da0a6..02214e63e 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -4,6 +4,7 @@ def index end def new #only cares about showing the form + @task = Task.new end def create #hash access to user data, from the form, @@ -24,14 +25,18 @@ def show # title: params[:book_id] end - def update + def edit + @task = Task.find(params[:id]) end - def edit_task - @task = Task.find(params[:id]) + def update + # @task = Task.find(params[:id]) + # @task.update(title: params[:title], description: params[:description], date: params[:date]) + # redirect_to task_path(@task) end def destroy + end end diff --git a/app/views/tasks/edit.html.erb b/app/views/tasks/edit.html.erb index efb813c09..8c04391ad 100644 --- a/app/views/tasks/edit.html.erb +++ b/app/views/tasks/edit.html.erb @@ -1 +1,23 @@

      This is the edit page

      + + +<%= form_for(@task) do |f| %> +

      + <%= f.label :title %>
      + <%= f.text_field :title %> +

      + +

      + <%= f.label :description %>
      + <%= f.text_field :description %> +

      + +

      + <%= f.label :date %>
      + <%= f.date_field :date %> +

      + +

      + <%= f.submit "Save Changes"%> +

      +<% end %> diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index 7c1c74ef3..90427201d 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -9,6 +9,7 @@ <% @tasks.each_with_index do |task, index| %>
    • <%= link_to "#{task[:title]}", show_path(index + 1) %> + <%= link_to 'Edit', edit_task_path(task) %>
    • <% end %>

    diff --git a/app/views/tasks/new.html.erb b/app/views/tasks/new.html.erb index 439daef03..31b8be1e7 100644 --- a/app/views/tasks/new.html.erb +++ b/app/views/tasks/new.html.erb @@ -18,15 +18,18 @@ --> -<%= form_tag ('/tasks') do %> -<%= label_tag "task[title]", "TASK NAME" %> -<%= text_field_tag "task[title]" %> -<%= label_tag "task[description]", "TASK DESCRIPTION" %> -<%= text_field_tag "task[description]" %> -<%= label_tag "task[date]", "DATE" %> -<%= date_field_tag "task[date]" %> -<%= submit_tag "Press This Button" %> +<%= form_for(@task) do |f| %> +<%= f.label :title %> +<%= f.text_field :title %> + +<%= f.label :description %> +<%= f.text_field :description %> + +<%= f.label :date %> +<%= f.date_field :date %> + +<%= f.submit "Press This Button" %> <% end %> diff --git a/config/routes.rb b/config/routes.rb index da6a48635..5a33602a7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,34 +3,46 @@ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html -get '/tasks', to: 'tasks#index', as: 'index' + get '/tasks', to: 'tasks#index', as: 'index' # get '/books', to: 'books#index', as: 'books' # get '/puppies', to: 'puppies#index', at: 'puppies' -get '/tasks/new', to: 'tasks#new', as: 'new_task' + get '/tasks/new', to: 'tasks#new', as: 'new_task' # get '/books/new', to: 'books#new', as: 'new_book' #GETS the form to Update or Add Info, but doesn't do the update -post '/tasks', to: 'tasks#create' -# post '/books', to: 'books#create' + get '/tasks/:id', to: 'tasks#show', as: 'show' + # get '/books/:id', to: 'books#show', as: 'book' + # if youcall the show method, it finds whatever id you put in and then goes to the tasks/id route + #task_path(task) + -# post '/tasks/new', to: 'tasks#new', as: 'add_task' + post '/tasks', to: 'tasks#create' + # post '/books', to: 'books#create' -get '/tasks/:id/edit', to: 'tasks#edit', as: 'edit_task' + # post '/tasks/new', to: 'tasks#new', as: 'add_task' + + get '/tasks/:id/edit', to: 'tasks#edit' + # , as: 'edit_task' + #This will just bring you to the edit form + # # get '/books/:id/edit', to: 'books#edit', as: 'edit_book' -get '/tasks/:id', to: 'tasks#show', as: 'show' - # get '/books/:id', to: 'books#show', as: 'book' -# if youcall the show method, it finds whatever id you put in and then goes to the tasks/id route -patch '/tasks:id', to: 'tasks#update' + patch '/tasks/:id', to: 'tasks#update', as: 'update' # put '/books/:id', to: 'books#update' - -delete '/tasks:id', to: 'tasks#destroy', as: 'delete' -# delete '/books/:id', to: 'books#destroy' -################ - # + #task_path(task) + delete '/tasks/:id', to: 'tasks#destroy', as: 'delete' + # delete '/books/:id', to: 'books#destroy' + ################ # + #GET /users index users_path page to list all users + # GET /users/1 show user_path(user) page to show user + # GET /users/new new new_user_path page to make a new user (signup) + # POST /users create users_path create a new user + # GET /users/1/edit edit edit_user_path(user) page to edit user with id 1 + # PATCH /users/1 update user_path(user) update user + # DELETE /users/1 destroy user_path(user) delete user # # post '/books/:id/checkout', to: 'books#checkout', as: 'checkout_book' diff --git a/db/development.sqlite3 b/db/development.sqlite3 index 1d17f2d347ad4c2bc9c1d2e8366ecf5efa55eede..57ed030f4d08281c09be26bf1a48b026a6959238 100644 GIT binary patch delta 561 zcmZp8z}WDBae_3X^h6nFM(K?SOZ=I|I7KG22PkuKE#~sz{J`17DYCKg0Y`m~7(0WZ zxuTskw=%C2pAxxs-5*^YKvr}^uGjsHk^K-#^42^W_ z(fwg)W@T!oXJKk!Y=GuNWSK}|pg&}R1}B0{hT)WAFdOb36FAFA!NA1I#K_9nT+iIn z+}H%}W}yA(Qb9uO4APQ7vrAG-U`Cgx!i+MsfU!V2jjc=#K;dp?W@c<)hFd07kexwP R72Ul+cW)MmelNl(1_0T6jdK71 delta 38 ucmZp8z}WDBae_3X*hCp;MzM_vOZ=GyxxP"7"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (0.7ms) +Completed 500 Internal Server Error in 8ms (ActiveRecord: 0.0ms) + + + +SyntaxError (/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:4: syntax error, unexpected tIDENTIFIER, expecting keyword_end +_tag ('/task/:id/edit') method: :patch do @output_buffer.saf + ^ +/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:17: syntax error, unexpected keyword_ensure, expecting end-of-input + ensure + ^): + +app/views/tasks/edit.html.erb:4: syntax error, unexpected tIDENTIFIER, expecting keyword_end +app/views/tasks/edit.html.erb:17: syntax error, unexpected keyword_ensure, expecting end-of-input +Started GET "/tasks/7/edit" for 127.0.0.1 at 2017-09-21 20:48:44 -0700 +Processing by TasksController#edit as HTML +Started GET "/tasks/3/edit" for 127.0.0.1 at 2017-09-21 20:48:54 -0700 + Parameters: {"id"=>"7"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (0.6ms) +Completed 500 Internal Server Error in 7ms + + + +SyntaxError (/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:4: syntax error, unexpected tIDENTIFIER, expecting keyword_end +tag ('/tasks/:id/edit') method: :patch do @output_buffer.saf + ^ +/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:17: syntax error, unexpected keyword_ensure, expecting end-of-input + ensure + ^): + +app/views/tasks/edit.html.erb:4: syntax error, unexpected tIDENTIFIER, expecting keyword_end +app/views/tasks/edit.html.erb:17: syntax error, unexpected keyword_ensure, expecting end-of-input +Processing by TasksController#edit as HTML + Parameters: {"id"=>"3"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (0.6ms) +Completed 500 Internal Server Error in 8ms + + + +SyntaxError (/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:4: syntax error, unexpected tIDENTIFIER, expecting keyword_end +tag ('/tasks/:id/edit') method: :patch do @output_buffer.saf + ^ +/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:17: syntax error, unexpected keyword_ensure, expecting end-of-input + ensure + ^): + +app/views/tasks/edit.html.erb:4: syntax error, unexpected tIDENTIFIER, expecting keyword_end +app/views/tasks/edit.html.erb:17: syntax error, unexpected keyword_ensure, expecting end-of-input +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 20:49:59 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.5ms) +Completed 200 OK in 21ms (Views: 17.9ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 20:50:08 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"G0My9RecdjJ9+ywvo1DPgObc+VwKnI6APjU1LGSDmHXZdBbWTzKucYH5XXGNr0+9+EYcjr1tnc6aBLrbY70+aQ==", "task"=>{"title"=>"tetasdf", "description"=>"asdfwe", "date"=>"2017-09-18"}, "commit"=>"Press This Button"} +  (0.1ms) begin transaction + SQL (1.6ms) INSERT INTO "tasks" ("title", "description", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "tetasdf"], ["description", "asdfwe"], ["date", "2017-09-18"], ["created_at", "2017-09-22 03:50:08.666306"], ["updated_at", "2017-09-22 03:50:08.666306"]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 25ms (ActiveRecord: 3.8ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 20:50:08 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (2.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (5.8ms) +Completed 200 OK in 29ms (Views: 22.6ms | ActiveRecord: 2.1ms) + + +Started GET "/tasks/18" for 127.0.0.1 at 2017-09-21 20:50:10 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"18"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 18], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.8ms) +Completed 200 OK in 38ms (Views: 29.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/15/edit" for 127.0.0.1 at 2017-09-21 20:51:33 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"15"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (0.7ms) +Completed 500 Internal Server Error in 7ms (ActiveRecord: 0.0ms) + + + +SyntaxError (/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:4: syntax error, unexpected tLABEL, expecting keyword_end + edit_task_path(@task) method: :patch do @output_buffer.safe + ^ +/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:17: syntax error, unexpected keyword_ensure, expecting end-of-input + ensure + ^): + +app/views/tasks/edit.html.erb:4: syntax error, unexpected tLABEL, expecting keyword_end +app/views/tasks/edit.html.erb:17: syntax error, unexpected keyword_ensure, expecting end-of-input +Started GET "/tasks/15/edit" for 127.0.0.1 at 2017-09-21 20:52:12 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"15"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.8ms) +Completed 500 Internal Server Error in 9ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (No route matches {:action=>"edit", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag edit_task_path(@task), method: :patch do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205753281220' +Started GET "/tasks/15/edit" for 127.0.0.1 at 2017-09-21 20:53:40 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"15"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.5ms) +Completed 500 Internal Server Error in 14ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (undefined method `id' for nil:NilClass): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag edit_task_path(@task.id), method: :patch do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205768768580' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 20:54:01 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.6ms) +Completed 500 Internal Server Error in 11ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (undefined method `id' for nil:NilClass): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag edit_task_path(@task.id), method: :patch do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205767403120' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 20:57:32 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.4ms) +Completed 500 Internal Server Error in 10ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (No route matches {:action=>"edit", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag edit_task_path(@task), method: :patch do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205768876840' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 20:58:19 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.9ms) +Completed 500 Internal Server Error in 15ms + + + +ActionView::Template::Error (No route matches {:action=>"edit", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag edit_task_path(@task), method: :patch do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205758523140' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 20:58:56 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.0ms) +Completed 500 Internal Server Error in 14ms + + + +ActionView::Template::Error (No route matches {:action=>"edit", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag edit_task_path(@task), method: :patch do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205796711500' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 21:00:33 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.8ms) +Completed 500 Internal Server Error in 10ms + + + +ActionView::Template::Error (No route matches {:action=>"edit", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag edit_task_path(@task), method: :patch do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205760768860' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 21:04:57 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (98.1ms) +Completed 500 Internal Server Error in 106ms + + + +ActionView::Template::Error (undefined method `task_path' for #<#:0x007fb41ab23588> +Did you mean? tasks_path): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag task_path(@task), method: :patch do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205759391480' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 21:05:17 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (4.2ms) +Completed 500 Internal Server Error in 11ms + + + +ActionView::Template::Error (undefined method `title' for nil:NilClass): + 3: + 4: <%= form_tag tasks_path(@task), method: :patch do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + 8: <%= label_tag "task[description]", "TASK DESCRIPTION" %> + 9: <%= text_field_tag :description, @task.description %> + +app/views/tasks/edit.html.erb:6:in `block in _app_views_tasks_edit_html_erb___568123450125745998_70205778412400' +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205778412400' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 21:07:12 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (106.3ms) +Completed 500 Internal Server Error in 114ms + + + +ActionView::Template::Error (undefined method `edit_tasks_path' for #<#:0x007fb41fab0808> +Did you mean? edit_task_path): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag edit_tasks_path(@task), method: :patch do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205801072840' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 21:07:33 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.1ms) +Completed 500 Internal Server Error in 10ms + + + +ActionView::Template::Error (No route matches {:action=>"edit", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag edit_task_path(@task), method: :patch do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205769420100' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 21:08:20 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.7ms) +Completed 500 Internal Server Error in 10ms + + + +ActionView::Template::Error (No route matches {:action=>"update", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag update_path(@task), method: :patch do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205796330720' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 21:15:13 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (0.6ms) +Completed 500 Internal Server Error in 8ms + + + +SyntaxError (/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:4: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' +g update_path(@task), method "patch" do @output_buffer.safe_ + ^ +/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:4: syntax error, unexpected keyword_do_block, expecting keyword_end +path(@task), method "patch" do @output_buffer.safe_append=' + ^ +/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:17: syntax error, unexpected keyword_ensure, expecting end-of-input + ensure + ^): + +app/views/tasks/edit.html.erb:4: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' +app/views/tasks/edit.html.erb:4: syntax error, unexpected keyword_do_block, expecting keyword_end +app/views/tasks/edit.html.erb:17: syntax error, unexpected keyword_ensure, expecting end-of-input +Started GET "/tasks/edit" for 127.0.0.1 at 2017-09-21 21:17:56 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"edit"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 0], ["LIMIT", 1]] +Completed 404 Not Found in 9ms (ActiveRecord: 1.6ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=edit): + +app/controllers/tasks_controller.rb:20:in `show' +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-21 21:18: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.5ms) +Completed 200 OK in 26ms (Views: 15.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1/edit" for 127.0.0.1 at 2017-09-21 21:18:18 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (0.7ms) +Completed 500 Internal Server Error in 8ms (ActiveRecord: 0.0ms) + + + +SyntaxError (/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:4: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' +g update_path(@task), method "patch" do @output_buffer.safe_ + ^ +/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:4: syntax error, unexpected keyword_do_block, expecting keyword_end +path(@task), method "patch" do @output_buffer.safe_append=' + ^ +/Users/amymcash/ada/WeekSeven/TaskList/app/views/tasks/edit.html.erb:17: syntax error, unexpected keyword_ensure, expecting end-of-input + ensure + ^): + +app/views/tasks/edit.html.erb:4: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' +app/views/tasks/edit.html.erb:4: syntax error, unexpected keyword_do_block, expecting keyword_end +app/views/tasks/edit.html.erb:17: syntax error, unexpected keyword_ensure, expecting end-of-input +Started GET "/tasks/1/edit" for 127.0.0.1 at 2017-09-21 21:18:51 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.2ms) +Completed 500 Internal Server Error in 11ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (No route matches {:action=>"update", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag update_path(@task), method: "patch" do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205758425460' +Started GET "/tasks/1/edit" for 127.0.0.1 at 2017-09-21 21:19:26 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.6ms) +Completed 500 Internal Server Error in 10ms + + + +ActionView::Template::Error (No route matches {:action=>"update", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag update_path(@task), method: "patch" do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205796606820' +Started GET "/tasks/1/edit" for 127.0.0.1 at 2017-09-21 21:21:29 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.7ms) +Completed 500 Internal Server Error in 10ms + + + +ActionView::Template::Error (No route matches {:action=>"update", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag update_path(@task), method: "patch" do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205797897580' +Started GET "/tasks/1/edit" for 127.0.0.1 at 2017-09-21 21:24:12 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.5ms) +Completed 500 Internal Server Error in 10ms + + + +ActionView::Template::Error (No route matches {:action=>"update", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag update_path(@task), method: "put" do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205752283500' +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-21 21:24:20 -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 27ms (Views: 14.1ms | ActiveRecord: 1.1ms) + + +Started GET "/tasks/edit" for 127.0.0.1 at 2017-09-21 21:24:24 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"edit"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 0], ["LIMIT", 1]] +Completed 404 Not Found in 2ms (ActiveRecord: 0.5ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=edit): + +app/controllers/tasks_controller.rb:20:in `show' +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 21:24:35 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.3ms) +Completed 200 OK in 26ms (Views: 23.0ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/id/edit" for 127.0.0.1 at 2017-09-21 21:24:45 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"id"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.9ms) +Completed 500 Internal Server Error in 10ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (No route matches {:action=>"update", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag update_path(@task), method: "put" do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205769239820' +Started GET "/tasks/id/edit" for 127.0.0.1 at 2017-09-21 21:25:31 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"id"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.6ms) +Completed 500 Internal Server Error in 10ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (No route matches {:action=>"edit", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag edit_task_path(@task), method: "put" do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205795912240' +Started GET "/tasks/id/edit" for 127.0.0.1 at 2017-09-21 21:26:05 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"id"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.9ms) +Completed 500 Internal Server Error in 10ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (undefined method `id' for nil:NilClass): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_tag edit_task_path(@task.id), method: "put" do %> + 5: <%= label_tag "task[title]", "TASK NAME" %> + 6: <%= text_field_tag :title, @task.title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205768489480' +Started GET "/tasks/id/edit" for 127.0.0.1 at 2017-09-21 21:33:22 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"id"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.7ms) +Completed 500 Internal Server Error in 11ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 4: + 5: + 6: + 7: <%= form_for @task do |f| %> + 8: <%= f.label :title %> + 9: <%= f.text_field :title %> + 10: <%= f.submit %> + +app/views/tasks/edit.html.erb:7:in `_app_views_tasks_edit_html_erb___568123450125745998_70205752333780' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 21:33:27 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + 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.0ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 4: + 5: + 6: + 7: <%= form_for @task do |f| %> + 8: <%= f.label :title %> + 9: <%= f.text_field :title %> + 10: <%= f.submit %> + +app/views/tasks/edit.html.erb:7:in `_app_views_tasks_edit_html_erb___568123450125745998_70205800549880' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 21:36:12 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.6ms) +Completed 500 Internal Server Error in 10ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 4: + 5: + 6: + 7: <%= form_for @task do |f| %> + 8: <%= f.label :title %> + 9: <%= f.text_field :title %> + 10: + +app/views/tasks/edit.html.erb:7:in `_app_views_tasks_edit_html_erb___568123450125745998_70205769407500' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 21:38:56 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.9ms) +Completed 500 Internal Server Error in 11ms + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_for @task do |f| %> + 5: <%= f.label :title %> + 6: <%= f.text_field :title %> + 7: + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___568123450125745998_70205796065220' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 21:40:18 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.5ms) +Completed 500 Internal Server Error in 10ms + + + +ActionView::Template::Error (No route matches {:action=>"edit", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 3: + 4: + 5: + 6: <%= form_tag edit_task_path(@task), method: "put" do %> + 7: <%= label_tag "task[title]", "TASK NAME" %> + 8: <%= text_field_tag :title, @task.title %> + 9: + +app/views/tasks/edit.html.erb:6:in `_app_views_tasks_edit_html_erb___568123450125745998_70205797600440' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 21:40:32 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.0ms) +Completed 500 Internal Server Error in 10ms + + + +ActionView::Template::Error (undefined method `id' for nil:NilClass): + 3: + 4: + 5: + 6: <%= form_tag edit_task_path(@task.id), method: "put" do %> + 7: <%= label_tag "task[title]", "TASK NAME" %> + 8: <%= text_field_tag :title, @task.title %> + 9: + +app/views/tasks/edit.html.erb:6:in `_app_views_tasks_edit_html_erb___568123450125745998_70205778085060' +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-21 21:40:55 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"2"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.4ms) +Completed 500 Internal Server Error in 10ms + + + +ActionView::Template::Error (No route matches {:action=>"update", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 3: + 4: + 5: + 6: <%= form_tag update_path(@task), method: "put" do %> + 7: <%= label_tag "task[title]", "TASK NAME" %> + 8: <%= text_field_tag :title, @task.title %> + 9: + +app/views/tasks/edit.html.erb:6:in `_app_views_tasks_edit_html_erb___568123450125745998_70205800337380' +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 21:42: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 (10.5ms) +Completed 200 OK in 35ms (Views: 28.1ms | ActiveRecord: 1.2ms) + + +Started GET "/tasks/4" for 127.0.0.1 at 2017-09-21 21:42:16 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"4"} + Task Load (0.2ms) 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.7ms) +Completed 200 OK in 34ms (Views: 28.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/4/edit" for 127.0.0.1 at 2017-09-21 21:42:21 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"4"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.6ms) +Completed 500 Internal Server Error in 10ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (No route matches {:action=>"update", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 3: + 4: + 5: + 6: <%= form_tag update_path(@task), method: "put" do %> + 7: <%= label_tag "task[title]", "TASK NAME" %> + 8: <%= text_field_tag :title, @task.title %> + 9: + +app/views/tasks/edit.html.erb:6:in `_app_views_tasks_edit_html_erb___568123450125745998_70205797212200' +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 21:42:29 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.5ms) +Completed 200 OK in 19ms (Views: 16.2ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 21:42:37 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"WKG8kdCO20LyZ0CZ3CIEq2jx7NAyHUxVBJdBoy/RRYaalpiyiCADAQ5lMcfy3YSWdmsJAoXsXxugps5UKO/jmg==", "task"=>{"title"=>"asdfasdfasdf", "description"=>"adsfasdf", "date"=>"2017-09-24"}, "commit"=>"Press This Button"} +  (0.1ms) begin transaction + SQL (0.4ms) INSERT INTO "tasks" ("title", "description", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "asdfasdfasdf"], ["description", "adsfasdf"], ["date", "2017-09-24"], ["created_at", "2017-09-22 04:42:37.797347"], ["updated_at", "2017-09-22 04:42:37.797347"]] +  (0.8ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 21:42:37 -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 (3.3ms) +Completed 200 OK in 24ms (Views: 19.4ms | ActiveRecord: 0.7ms) + + +Started GET "/tasks/19" for 127.0.0.1 at 2017-09-21 21:42:41 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"19"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 19], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 31ms (Views: 25.4ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 21:46:51 -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 21ms (Views: 17.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-21 21:46:58 -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 30ms (Views: 24.9ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 21:48:10 -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 (6.2ms) +Completed 200 OK in 25ms (Views: 22.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 21:48:12 -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 (8.7ms) +Completed 200 OK in 33ms (Views: 28.3ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 21:48: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 (7.7ms) +Completed 200 OK in 31ms (Views: 27.4ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 21:48: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 (7.8ms) +Completed 200 OK in 38ms (Views: 34.7ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 21:48:17 -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.3ms) +Completed 200 OK in 39ms (Views: 35.2ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 21:48:18 -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.7ms) +Completed 200 OK in 38ms (Views: 33.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 21:49:08 -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 23ms (Views: 19.8ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1/edit" for 127.0.0.1 at 2017-09-21 21:49:10 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.5ms) +Completed 500 Internal Server Error in 10ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (No route matches {:action=>"update", :controller=>"tasks", :id=>nil}, missing required keys: [:id]): + 3: + 4: + 5: + 6: <%= form_tag update_path(@task), method: "put" do %> + 7: <%= label_tag "task[title]", "TASK NAME" %> + 8: <%= text_field_tag :title, @task.title %> + 9: + +app/views/tasks/edit.html.erb:6:in `_app_views_tasks_edit_html_erb___568123450125745998_70205798481660' +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 21:51:20 -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.6ms) +Completed 200 OK in 23ms (Views: 19.9ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 21:51:21 -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 (10.0ms) +Completed 200 OK in 31ms (Views: 26.4ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/5/edit" for 127.0.0.1 at 2017-09-21 21:51:23 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"5"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.8ms) +Completed 500 Internal Server Error in 10ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 4: + 5: + 6: + 7: <%= form_for @task do |f| %> + 8:

    + 9: <%= f.label :title %>
    + 10: <%= f.text_field :title %> + +app/views/tasks/edit.html.erb:7:in `_app_views_tasks_edit_html_erb___568123450125745998_70205798725740' +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 21:52:14 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (9.0ms) +Completed 200 OK in 29ms (Views: 24.8ms | ActiveRecord: 1.1ms) + + +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 21:52: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 (3.0ms) +Completed 200 OK in 24ms (Views: 20.8ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/4/edit" for 127.0.0.1 at 2017-09-21 21:52:16 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"4"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (8.6ms) +Completed 500 Internal Server Error in 18ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 4: + 5: + 6: + 7: <%= form_for @task do |f| %> + 8:

    + 9: <%= f.label :title %>
    + 10: <%= f.text_field :title %> + +app/views/tasks/edit.html.erb:7:in `_app_views_tasks_edit_html_erb___568123450125745998_70205774665180' +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-21 21:56:28 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.7ms) +Completed 200 OK in 28ms (Views: 23.8ms | ActiveRecord: 0.8ms) + + +Started GET "/tasks/9/edit" for 127.0.0.1 at 2017-09-21 21:56:30 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"9"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.4ms) +Completed 500 Internal Server Error in 10ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 4: + 5: + 6: + 7: <%= form_for @task do |f| %> + 8:

    + 9: <%= f.label :title %>
    + 10: <%= f.text_field :title %> + +app/views/tasks/edit.html.erb:7:in `_app_views_tasks_edit_html_erb___568123450125745998_70205759130980' +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 22:16:29 -0700 +  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +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 (10.4ms) +Completed 200 OK in 195ms (Views: 182.9ms | ActiveRecord: 1.0ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 22:16:34 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (20.1ms) +Completed 200 OK in 59ms (Views: 56.2ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 22:16:56 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"JrHiVD+ZVLzr18HxDDF/SIgmA7kZ48MjEdFVOi/b+HjkhsZ3ZzeM/xfVsK8izv91lrzma64S0G214NrNKOVeZA==", "task"=>{"title"=>"sdf", "description"=>"a@fakemail.com", "date"=>"2017-12-22"}, "commit"=>"Create my account"} +  (0.1ms) begin transaction + SQL (0.5ms) INSERT INTO "tasks" ("title", "description", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "sdf"], ["description", "a@fakemail.com"], ["date", "2017-12-22"], ["created_at", "2017-09-22 05:16:56.850302"], ["updated_at", "2017-09-22 05:16:56.850302"]] +  (1.7ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 2.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 22:16: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 (3.2ms) +Completed 200 OK in 29ms (Views: 23.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/5/edit" for 127.0.0.1 at 2017-09-21 22:17:01 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"5"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.7ms) +Completed 500 Internal Server Error in 12ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 4: + 5: + 6: + 7: <%= form_for @task do |f| %> + 8:

    + 9: <%= f.label :title %>
    + 10: <%= f.text_field :title %> + +app/views/tasks/edit.html.erb:7:in `_app_views_tasks_edit_html_erb___218958658013979638_70211401038440' +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 22:17:47 -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 26ms (Views: 23.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/5" for 127.0.0.1 at 2017-09-21 22:17:50 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"5"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 5], ["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: 24.6ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/20" for 127.0.0.1 at 2017-09-21 22:17:54 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"20"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 20], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 31ms (Views: 24.8ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 22:18:00 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (8.7ms) +Completed 200 OK in 29ms (Views: 26.4ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 22:18:14 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"6ua+qRMnKAP2Mika6UDwh6GzTrJ20P7X8toJ/1hLEEEo0ZqKS4nwQAowWETHv3C6vymrYMEh7ZlW64YIX3W2XQ==", "task"=>{"title"=>"Another Task", "description"=>"When WIll I figure this out", "date"=>"2017-09-22"}, "commit"=>"Press This Button"} +  (0.1ms) begin transaction + SQL (0.5ms) INSERT INTO "tasks" ("title", "description", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "Another Task"], ["description", "When WIll I figure this out"], ["date", "2017-09-22"], ["created_at", "2017-09-22 05:18:14.687117"], ["updated_at", "2017-09-22 05:18:14.687117"]] +  (0.7ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 22:18:14 -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 25ms (Views: 20.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/21/edit" for 127.0.0.1 at 2017-09-21 22:18:17 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"21"} + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.1ms) +Completed 500 Internal Server Error in 12ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 4: + 5: + 6: + 7: <%= form_for @task do |f| %> + 8:

    + 9: <%= f.label :title %>
    + 10: <%= f.text_field :title %> + +app/views/tasks/edit.html.erb:7:in `_app_views_tasks_edit_html_erb___218958658013979638_70211416200100' +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 22:24:29 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (12.6ms) +Completed 200 OK in 38ms (Views: 31.8ms | ActiveRecord: 1.2ms) + + +Started GET "/tasks/4" for 127.0.0.1 at 2017-09-21 22:24:33 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"4"} + Task Load (0.3ms) 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.1ms) +Completed 200 OK in 30ms (Views: 23.9ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/4/edit" for 127.0.0.1 at 2017-09-21 22:24:37 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"4"} + Task Load (0.2ms) 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 (116.8ms) +Completed 500 Internal Server Error in 130ms (ActiveRecord: 0.2ms) + + + +ActionView::Template::Error (undefined method `task_path' for #<#:0x007fb6b7d8f1d8> +Did you mean? tasks_path): + 4: + 5: + 6: + 7: <%= form_for(@task) do |f| %> + 8:

    + 9: <%= f.label :title %>
    + 10: <%= f.text_field :title %> + +app/views/tasks/edit.html.erb:7:in `_app_views_tasks_edit_html_erb___218958658013979638_70211372613080' +Started GET "/tasks/4/edit" for 127.0.0.1 at 2017-09-21 22:29:26 -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 (109.0ms) +Completed 500 Internal Server Error in 129ms (ActiveRecord: 1.4ms) + + + +ActionView::Template::Error (undefined method `task_path' for #<#:0x007fb6bd21dad8> +Did you mean? tasks_path): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_for(@task) do |f| %> + 5:

    + 6: <%= f.label :title %>
    + 7: <%= f.text_field :title %> + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___218958658013979638_70211416948680' +Started GET "/tasks/7/edit" for 127.0.0.1 at 2017-09-21 22:29:35 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"7"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 7], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (77.4ms) +Completed 500 Internal Server Error in 87ms (ActiveRecord: 0.2ms) + + + +ActionView::Template::Error (undefined method `task_path' for #<#:0x007fb6bc43c658> +Did you mean? tasks_path): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_for(@task) do |f| %> + 5:

    + 6: <%= f.label :title %>
    + 7: <%= f.text_field :title %> + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___218958658013979638_70211409668120' +Started GET "/task/7/edit" for 127.0.0.1 at 2017-09-21 22:29:39 -0700 + +ActionController::RoutingError (No route matches [GET] "/task/7/edit"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-21 22:31:56 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (2.1ms) +Completed 200 OK in 29ms (Views: 19.1ms | ActiveRecord: 0.7ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-21 22:32:08 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"QL7+gB9C42qDNt9ckp9MvxXYsCXk8Wjk8A0HJskFGJ6CidqjR+w7KX80rgK8YMyCC0JV91MAe6pUPIjRzju+gg==", "task"=>{"title"=>"why does this work", "description"=>"but the other doesn't", "date"=>"2017-09-22"}, "commit"=>"Press This Button"} +  (0.1ms) begin transaction + SQL (0.5ms) INSERT INTO "tasks" ("title", "description", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "why does this work"], ["description", "but the other doesn't"], ["date", "2017-09-22"], ["created_at", "2017-09-22 05:32:08.957459"], ["updated_at", "2017-09-22 05:32:08.957459"]] +  (1.0ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.5ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-21 22:32:08 -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 (105.9ms) +Completed 500 Internal Server Error in 117ms (ActiveRecord: 0.4ms) + + + +ActionView::Template::Error (undefined method `edit_task_path' for #<#:0x007fb6b873abb0>): + 9: <% @tasks.each_with_index do |task, index| %> + 10:

  • + 11: <%= link_to "#{task[:title]}", show_path(index + 1) %> + 12: <%= link_to 'Edit', edit_task_path(task) %> + 13:
  • + 14: <% end %> + 15:
+ +app/views/tasks/index.html.erb:12:in `block in _app_views_tasks_index_html_erb__3875507645525544712_70211377512800' +app/views/tasks/index.html.erb:9:in `each_with_index' +app/views/tasks/index.html.erb:9:in `_app_views_tasks_index_html_erb__3875507645525544712_70211377512800' From e6c236aa22734ce477fa5b7b36a743bf95397e4f Mon Sep 17 00:00:00 2001 From: Amy Cash Date: Fri, 22 Sep 2017 09:35:38 -0700 Subject: [PATCH 08/12] Edit is working but I'm not sure why --- app/controllers/tasks_controller.rb | 9 + app/views/tasks/edit.html.erb | 26 +- app/views/tasks/index.html.erb | 25 +- config/routes.rb | 49 ++- db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 455 ++++++++++++++++++++++++++++ 6 files changed, 527 insertions(+), 37 deletions(-) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 02214e63e..6e4da6f27 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -30,6 +30,15 @@ def edit end def update + @task = Task.find(params[:id]) + @task.title = params[:task][:title] + @task.description = params[:task][:description] + @task.date = params[:task][:date] + @task.save + redirect_to task_path(@task) + + + # @task = Task.find(params[:id]) # @task.update(title: params[:title], description: params[:description], date: params[:date]) # redirect_to task_path(@task) diff --git a/app/views/tasks/edit.html.erb b/app/views/tasks/edit.html.erb index 8c04391ad..bdddd578b 100644 --- a/app/views/tasks/edit.html.erb +++ b/app/views/tasks/edit.html.erb @@ -1,23 +1,13 @@

This is the edit page

+<%= form_for @task do |f| %> + <%= f.label :title %> + <%= f.text_field :title %> + <%= f.label :description %> + <%= f.text_field :description %> -<%= form_for(@task) do |f| %> -

- <%= f.label :title %>
- <%= f.text_field :title %> -

+ <%= f.label :date %>
+ <%= f.date_field :date %> -

- <%= f.label :description %>
- <%= f.text_field :description %> -

- -

- <%= f.label :date %>
- <%= f.date_field :date %> -

- -

- <%= f.submit "Save Changes"%> -

+ <%= f.submit %> <% end %> diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index 90427201d..fe866bff6 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -4,12 +4,27 @@ <%= "To-Do" %> + +<%= link_to "List all Tasks", tasks_path %> + +<%= link_to "New Task", new_task_path %> + +<%= link_to "Task number seven", task_path(7) %> + +<%= link_to "Custom anchor tag", new_task_path, class: "link" %> + + + + + +
    - <% @tasks.each_with_index do |task, index| %> -
  • - <%= link_to "#{task[:title]}", show_path(index + 1) %> - <%= link_to 'Edit', edit_task_path(task) %> -
  • + <% @tasks.each do |task| %> +
  • + <%= link_to task.title, tasks_path(task.id) %> + <%= link_to 'edit', edit_task_path(task) %> + <%# This is a comment %> +
  • <% end %>
diff --git a/config/routes.rb b/config/routes.rb index 5a33602a7..a206ed5f6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,39 +1,63 @@ Rails.application.routes.draw do - get 'tasks/index' + # 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' + + 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' + + # resources :books + end + + # Rails.application.routes.draw do + # get '/tasks', to: 'tasks#index', as: 'tasks' + # get '/tasks/new', to: 'tasks#new', as: 'new_task' + # 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' + # # put '/books/:id', to: 'books#update' + # #task_path(task) + # delete '/tasks/:id', to: 'tasks#destroy' + # # delete '/books/:id', to: 'books#destroy' + # + # + # end # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html - get '/tasks', to: 'tasks#index', as: 'index' + # get '/books', to: 'books#index', as: 'books' # get '/puppies', to: 'puppies#index', at: 'puppies' - get '/tasks/new', to: 'tasks#new', as: 'new_task' + # get '/books/new', to: 'books#new', as: 'new_book' #GETS the form to Update or Add Info, but doesn't do the update - get '/tasks/:id', to: 'tasks#show', as: 'show' + # get '/books/:id', to: 'books#show', as: 'book' # if youcall the show method, it finds whatever id you put in and then goes to the tasks/id route #task_path(task) - post '/tasks', to: 'tasks#create' + # post '/books', to: 'books#create' # post '/tasks/new', to: 'tasks#new', as: 'add_task' - get '/tasks/:id/edit', to: 'tasks#edit' + # , as: 'edit_task' #This will just bring you to the edit form # # get '/books/:id/edit', to: 'books#edit', as: 'edit_book' - patch '/tasks/:id', to: 'tasks#update', as: 'update' - # put '/books/:id', to: 'books#update' - #task_path(task) - delete '/tasks/:id', to: 'tasks#destroy', as: 'delete' - # delete '/books/:id', to: 'books#destroy' + ################ # #GET /users index users_path page to list all users @@ -46,6 +70,3 @@ # # post '/books/:id/checkout', to: 'books#checkout', as: 'checkout_book' - - -end diff --git a/db/development.sqlite3 b/db/development.sqlite3 index 57ed030f4d08281c09be26bf1a48b026a6959238..b7b01fd200f2dca41d891f71c1af81a3f6df13f7 100644 GIT binary patch delta 320 zcmZp8z}WDBae_3X+(a2?M!Ag%3;j)bEE&W(I2icn^1JZ8<7?+rs(P_P zaY<=fngWR9<{9DYVq{=wu4`zdYiKe#CPoT~xy=mCtc*>7NYB#J!ot)%lAE1DUKwbL zTVi&qLP%n9wqssC$TS82yi|yG16@P&$$Mf{4I!i?eo3r-663Zn{03GfMm2^6t`;0Uu6StSDkI}MXBT@{m1Tw?+|3zIKh T7L%Y@7L%M<53}%G4-)|vQKliA diff --git a/log/development.log b/log/development.log index a47813965..065313873 100644 --- a/log/development.log +++ b/log/development.log @@ -3959,3 +3959,458 @@ ActionView::Template::Error (undefined method `edit_task_path' for #<#:0x007fbbd87480b0>): + 9: <% @tasks.each_with_index do |task, index| %> + 10:
  • + 11: <%= link_to "#{task[:title]}", show_path(index + 1) %> + 12: <%= link_to 'Edit', edit_task_path(task) %> + 13:
  • + 14: <% end %> + 15: + +app/views/tasks/index.html.erb:12:in `block in _app_views_tasks_index_html_erb___40111050652964092_70222383584360' +app/views/tasks/index.html.erb:9:in `each_with_index' +app/views/tasks/index.html.erb:9:in `_app_views_tasks_index_html_erb___40111050652964092_70222383584360' +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 09:06:22 -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.7ms) +Completed 200 OK in 195ms (Views: 190.8ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/2" for 127.0.0.1 at 2017-09-22 09:06:33 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.3ms) 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.6ms) +Completed 200 OK in 23ms (Views: 18.0ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-22 09:06:37 -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 (104.1ms) +Completed 500 Internal Server Error in 117ms (ActiveRecord: 0.2ms) + + + +ActionView::Template::Error (undefined method `task_path' for #<#:0x007fbbd9d37e48> +Did you mean? tasks_path): + 1:

    This is the edit page

    + 2: + 3: + 4: <%= form_for @task do |f| %> + 5:

    + 6: <%= f.label :title %>
    + 7: <%= f.text_field :title %> + +app/views/tasks/edit.html.erb:4:in `_app_views_tasks_edit_html_erb___669894083229533102_70222394100180' +Started GET "/tasks/2" for 127.0.0.1 at 2017-09-22 09:16:49 -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.4ms) +Completed 200 OK in 27ms (Views: 15.9ms | ActiveRecord: 0.9ms) + + +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-22 09:16: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.4ms) +Completed 500 Internal Server Error in 13ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (undefined method `each' for nil:NilClass): + 7: + 8: + 9:

      + 10: <% @books.each do |book| %> + 11:
    • + 12: <%= link_to task.title, book_path(task.id) %> + 13: <%# This is a comment %> + +app/views/tasks/index.html.erb:10:in `_app_views_tasks_index_html_erb___40111050652964092_70222394675940' +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-22 09:17:51 -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 (102.6ms) +Completed 500 Internal Server Error in 111ms (ActiveRecord: 0.3ms) + + + +ActionView::Template::Error (undefined method `task_path' for #<#:0x007fbbd5c4fae8> +Did you mean? tasks_path): + 9:
        + 10: <% @tasks.each do |task| %> + 11:
      • + 12: <%= link_to task.title, task_path(task.id) %> + 13: <%# This is a comment %> + 14:
      • + 15: <% end %> + +app/views/tasks/index.html.erb:12:in `block in _app_views_tasks_index_html_erb___40111050652964092_70222395073200' +app/views/tasks/index.html.erb:10:in `_app_views_tasks_index_html_erb___40111050652964092_70222395073200' +Started GET "/tasks/index" for 127.0.0.1 at 2017-09-22 09:18: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 (3.6ms) +Completed 200 OK in 25ms (Views: 21.1ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks.4" for 127.0.0.1 at 2017-09-22 09:18:18 -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.8ms) +Completed 200 OK in 59ms (Views: 35.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks.5" for 127.0.0.1 at 2017-09-22 09:18:20 -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 57ms (Views: 35.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-22 09:18:31 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (21.7ms) +Completed 200 OK in 40ms (Views: 37.1ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-22 09:18:39 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"QOkjBOh8h96xmV8HGU7qExUYAakoTwvEzYj12R8E271KfDMB1Hw+94ebXFMdnhCwYPVeLSDLpXW3l6Z+2Q81qw==", "task"=>{"title"=>"asdf", "description"=>"asdf", "date"=>"2017-09-13"}, "commit"=>"Press This Button"} +  (0.1ms) begin transaction + SQL (0.8ms) INSERT INTO "tasks" ("title", "description", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "asdf"], ["description", "asdf"], ["date", "2017-09-13"], ["created_at", "2017-09-22 16:18:39.025743"], ["updated_at", "2017-09-22 16:18:39.025743"]] +  (0.9ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 1.9ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 09:18:39 -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 (4.2ms) +Completed 200 OK in 33ms (Views: 29.8ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/5" for 127.0.0.1 at 2017-09-22 09:18:56 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"5"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 5], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 27ms (Views: 23.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/5/edit" for 127.0.0.1 at 2017-09-22 09:19:07 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"5"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 5], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (107.6ms) +Completed 500 Internal Server Error in 119ms (ActiveRecord: 0.2ms) + + + +ActionView::Template::Error (undefined method `task_path' for #<#:0x007fbbd73fbf20> +Did you mean? tasks_path): + 1:

        This is the edit page

        + 2: <%= form_for @task do |f| %> + 3: <%= f.label :title %> + 4: <%= f.text_field :title %> + 5: + +app/views/tasks/edit.html.erb:2:in `_app_views_tasks_edit_html_erb___669894083229533102_70222373457020' +Started GET "/tasks/5/edit" for 127.0.0.1 at 2017-09-22 09:19:34 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"5"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 5], ["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 14ms (ActiveRecord: 0.2ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 1:

        This is the edit page

        + 2: <%= form_for @tasks do |f| %> + 3: <%= f.label :title %> + 4: <%= f.text_field :title %> + 5: + +app/views/tasks/edit.html.erb:2:in `_app_views_tasks_edit_html_erb___669894083229533102_70222394526020' +Started GET "/tasks/5/edit" for 127.0.0.1 at 2017-09-22 09:23:28 -0700 + +SyntaxError (/Users/amymcash/ada/WeekSeven/TaskList/config/routes.rb:26: syntax error, unexpected tIDENTIFIER, expecting keyword_end +:id/edit', to: 'tasks#edit' as: 'edit_task' + ^ +/Users/amymcash/ada/WeekSeven/TaskList/config/routes.rb:77: syntax error, unexpected keyword_end, expecting end-of-input): + +config/routes.rb:26: syntax error, unexpected tIDENTIFIER, expecting keyword_end +config/routes.rb:77: syntax error, unexpected keyword_end, expecting end-of-input +Started GET "/tasks/" for 127.0.0.1 at 2017-09-22 09:23:34 -0700 + +ActionController::RoutingError (No route matches [GET] "/tasks"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/tasks/" for 127.0.0.1 at 2017-09-22 09:26:21 -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 (8.9ms) +Completed 200 OK in 30ms (Views: 25.9ms | ActiveRecord: 1.0ms) + + +Started GET "/tasks.1" for 127.0.0.1 at 2017-09-22 09:26: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.8ms) +Completed 200 OK in 56ms (Views: 34.4ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/12" for 127.0.0.1 at 2017-09-22 09:26:33 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"12"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 12], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.5ms) +Completed 200 OK in 27ms (Views: 23.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/4" for 127.0.0.1 at 2017-09-22 09:26:38 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"4"} + Task Load (0.2ms) 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.8ms) +Completed 200 OK in 32ms (Views: 28.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/4/edit" for 127.0.0.1 at 2017-09-22 09:26:43 -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 (3.7ms) +Completed 500 Internal Server Error in 14ms (ActiveRecord: 0.1ms) + + + +ActionView::Template::Error (First argument in form cannot contain nil or be empty): + 1:

        This is the edit page

        + 2: <%= form_for @tasks do |f| %> + 3: <%= f.label :title %> + 4: <%= f.text_field :title %> + 5: + +app/views/tasks/edit.html.erb:2:in `_app_views_tasks_edit_html_erb___669894083229533102_70222395752260' +Started GET "/tasks/4/edit" for 127.0.0.1 at 2017-09-22 09:26:59 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"4"} + Task Load (0.2ms) 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 (3.6ms) +Completed 200 OK in 24ms (Views: 20.4ms | ActiveRecord: 0.2ms) + + +Started PATCH "/tasks/4" for 127.0.0.1 at 2017-09-22 09:27:55 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"/SL2nHUhJXnyQcT6PeYtezI8/Aq5eCEm4sdwS4bIngH3t+aZSSGcUMRDx645NtfYR9GjjrH8j5eY2CPsQMNwFw==", "task"=>{"title"=>"Cheese Eating", "description"=>"Eat a lot of Cheese", "date"=>"2017-09-21"}, "commit"=>"Update Task", "id"=>"4"} +Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms) + + + +NameError (uninitialized constant TasksController::Book): + +app/controllers/tasks_controller.rb:33:in `update' +Started PATCH "/tasks/4" for 127.0.0.1 at 2017-09-22 09:28:53 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"/SL2nHUhJXnyQcT6PeYtezI8/Aq5eCEm4sdwS4bIngH3t+aZSSGcUMRDx645NtfYR9GjjrH8j5eY2CPsQMNwFw==", "task"=>{"title"=>"Cheese Eating", "description"=>"Eat a lot of Cheese", "date"=>"2017-09-21"}, "commit"=>"Update Task", "id"=>"4"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 4], ["LIMIT", 1]] +Completed 500 Internal Server Error in 20ms (ActiveRecord: 1.1ms) + + + +NoMethodError (undefined method `author=' for #): + +app/controllers/tasks_controller.rb:34:in `update' +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-22 09:29:22 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (3.4ms) +Completed 200 OK in 33ms (Views: 20.1ms | ActiveRecord: 0.8ms) + + +Started GET "/tasks/3" for 127.0.0.1 at 2017-09-22 09:29:26 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"3"} + Task Load (0.3ms) 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 30ms (Views: 23.3ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/11" for 127.0.0.1 at 2017-09-22 09:29:30 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"11"} + Task Load (0.3ms) 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.5ms) +Completed 200 OK in 25ms (Views: 22.2ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/11/edit" for 127.0.0.1 at 2017-09-22 09:29:34 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"11"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 11], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (2.3ms) +Completed 200 OK in 26ms (Views: 20.8ms | ActiveRecord: 0.3ms) + + +Started PATCH "/tasks/11" for 127.0.0.1 at 2017-09-22 09:29:46 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"c69WEFMtX87AgJ+Eg7tCGlHGkA73foQ75ETE4vaCF3N5OkYVby3m5/aCnNCHa7i5JCvPiv/6KoqeW5dFMIn5ZQ==", "task"=>{"title"=>"Fake Task", "description"=>"Another One", "date"=>"2017-10-17"}, "commit"=>"Update Task", "id"=>"11"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 11], ["LIMIT", 1]] +  (0.2ms) begin transaction + SQL (0.5ms) UPDATE "tasks" SET "title" = ?, "description" = ?, "date" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["title", "Fake Task"], ["description", "Another One"], ["date", "2017-10-17"], ["updated_at", "2017-09-22 16:29:46.123417"], ["id", 11]] +  (0.8ms) commit transaction +Redirected to http://localhost:3000/tasks/11 +Completed 302 Found in 8ms (ActiveRecord: 2.0ms) + + +Started GET "/tasks/11" for 127.0.0.1 at 2017-09-22 09:29:46 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"11"} + Task Load (0.3ms) 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.5ms) +Completed 200 OK in 27ms (Views: 21.6ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 09:31:51 -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 (10.1ms) +Completed 200 OK in 29ms (Views: 25.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 09:31:56 -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 (5.9ms) +Completed 200 OK in 32ms (Views: 28.5ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-22 09:31:58 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (4.3ms) +Completed 200 OK in 36ms (Views: 31.5ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/7" for 127.0.0.1 at 2017-09-22 09:32:01 -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.7ms) +Completed 200 OK in 32ms (Views: 26.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-22 09:32:03 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (3.6ms) +Completed 200 OK in 34ms (Views: 28.3ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 09:34: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 (5.3ms) +Completed 200 OK in 26ms (Views: 23.0ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/13/edit" for 127.0.0.1 at 2017-09-22 09:34:19 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"13"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 13], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.1ms) +Completed 200 OK in 32ms (Views: 26.1ms | ActiveRecord: 0.2ms) + + +Started PATCH "/tasks/13" for 127.0.0.1 at 2017-09-22 09:34:34 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"LQcL7tTCDKl9/Ri+V+zm6McsKwos4uYx0P6iLI8ly+vqZGJtIY61NtjK43DaBmFjpKBGa8a6Ea2fsg/PEwEY+A==", "task"=>{"title"=>"Now there's stuff here", "description"=>"FIXED", "date"=>"2017-12-14"}, "commit"=>"Update Task", "id"=>"13"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 13], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.4ms) UPDATE "tasks" SET "title" = ?, "description" = ?, "date" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["title", "Now there's stuff here"], ["description", "FIXED"], ["date", "2017-12-14"], ["updated_at", "2017-09-22 16:34:34.998857"], ["id", 13]] +  (0.7ms) commit transaction +Redirected to http://localhost:3000/tasks/13 +Completed 302 Found in 5ms (ActiveRecord: 1.4ms) + + +Started GET "/tasks/13" for 127.0.0.1 at 2017-09-22 09:34:35 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"13"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 13], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.7ms) +Completed 200 OK in 23ms (Views: 18.4ms | ActiveRecord: 0.2ms) + + From 191587c2527f60eb6c2420362d6a83d6370fcc66 Mon Sep 17 00:00:00 2001 From: Amy Cash Date: Sat, 30 Sep 2017 15:54:21 -0700 Subject: [PATCH 09/12] Form partial, update css --- .DS_Store | Bin 0 -> 6148 bytes app/assets/stylesheets/tasks.scss | 8 +- app/controllers/tasks_controller.rb | 22 +- app/views/layouts/application.html.erb | 1 - app/views/tasks/_form.html.erb | 12 + app/views/tasks/edit.html.erb | 14 +- app/views/tasks/index.html.erb | 19 +- app/views/tasks/new.html.erb | 26 +- app/views/tasks/show.html.erb | 8 +- config/routes.rb | 59 +- db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 785 +++++++++++++++++++++++++ 12 files changed, 829 insertions(+), 125 deletions(-) create mode 100644 .DS_Store create mode 100644 app/views/tasks/_form.html.erb diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..87c291cab6dcc703b36538ec7454f6cbda80a165 GIT binary patch literal 6148 zcmeH~%}T>i5QWc}B86_cba`LFHwdLZL0_Q$U=buOg08dkwLSBrv`yW*kTWp%By(qS z$+yU40NCpN=@wW5nA2VH>C4o7-+f|N73rwv&v+YN_roslCfSz*Ufbaw2OK^&C-og3 z@PgqidW}cyG2oedyR*H^CnzccA|L`HAOa$AOn^PxZN5m=Dgq)P0zU-&`_SmFed(AQ zpAIfD0#IiRhw(aQ32O5IwJ#l08KGI0QnS=*#IP)9yj5ObI;LhhtcDM(ldUEci_`i1 z7U{4)RjUYyz$pQry=hDD|9A9X=6}zTiGT?FQvxcO_ lq7_r474ybh@y$_Q^K0(+rDJN8Galts{RlW0nF#y^fiE}39Bu#r literal 0 HcmV?d00001 diff --git a/app/assets/stylesheets/tasks.scss b/app/assets/stylesheets/tasks.scss index b17aeb229..e4fc19997 100644 --- a/app/assets/stylesheets/tasks.scss +++ b/app/assets/stylesheets/tasks.scss @@ -27,9 +27,15 @@ h3 { } .task-data { + list-style: none; + text-decoration: none; border: 1px solid blue; } -li { +.task-items:link { + text-decoration: none; +} +li { + text-decoration: none; } diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 6e4da6f27..6ccf24851 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -3,26 +3,18 @@ def index @tasks = Task.all end - def new #only cares about showing the form + def new @task = Task.new end - def create #hash access to user data, from the form, - # x = Task.new(title: "Ada" , description: "it's a name") + def create task = Task.new(title: params[:task][:title], description: params[:task][:description], date: params[:task][:date]) - #calls the form, in the first example, you create a new entry by adding the info yourself - #in the second example you use user input as the values -- task.save #saves it redirect_to('/tasks') - #return user to main page end def show @task = Task.find(params[:id]) - - #@task = Task.find(params[:id]) - # @task = Task.find_by(params[:id]) - # title: params[:book_id] end def edit @@ -36,16 +28,12 @@ def update @task.date = params[:task][:date] @task.save redirect_to task_path(@task) - - - - # @task = Task.find(params[:id]) - # @task.update(title: params[:title], description: params[:description], date: params[:date]) - # redirect_to task_path(@task) end def destroy - + @task = Task.find(params[:id]) + @task.destroy + redirect_to tasks_path end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 8420f2026..268da62d0 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -9,7 +9,6 @@
        -

        Welcome to my List of Many Tasks: This is stuff that will be included on ever page because it's in the Header of the LayOut.

        diff --git a/app/views/tasks/_form.html.erb b/app/views/tasks/_form.html.erb new file mode 100644 index 000000000..514861ebd --- /dev/null +++ b/app/views/tasks/_form.html.erb @@ -0,0 +1,12 @@ +<%= form_for @task do |f| %> + <%= f.label :title %> + <%= f.text_field :title %> + + <%= f.label :description %> + <%= f.text_field :description %> + + <%= f.label :date %>
        + <%= f.date_field :date %> + + <%= f.submit %> +<% end %> diff --git a/app/views/tasks/edit.html.erb b/app/views/tasks/edit.html.erb index bdddd578b..b220f7425 100644 --- a/app/views/tasks/edit.html.erb +++ b/app/views/tasks/edit.html.erb @@ -1,13 +1,3 @@ -

        This is the edit page

        -<%= form_for @task do |f| %> - <%= f.label :title %> - <%= f.text_field :title %> +

        Edit Your Task Here

        - <%= f.label :description %> - <%= f.text_field :description %> - - <%= f.label :date %>
        - <%= f.date_field :date %> - - <%= f.submit %> -<% end %> +<%= render 'form', task: @task %> diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index fe866bff6..b1191b4df 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -1,30 +1,19 @@

        Tasks I Probably Won't Do

        -

        - <%= "To-Do" %> -

        <%= link_to "List all Tasks", tasks_path %> <%= link_to "New Task", new_task_path %> -<%= link_to "Task number seven", task_path(7) %> - -<%= link_to "Custom anchor tag", new_task_path, class: "link" %> - - - - -
          <% @tasks.each do |task| %> -
        • - <%= link_to task.title, tasks_path(task.id) %> - <%= link_to 'edit', edit_task_path(task) %> - <%# This is a comment %> +
        • + <%= link_to task.title, task_path(task.id) %> + <%= link_to 'edit', edit_task_path(task.id) %> + <%= link_to 'delete', task_path(task.id), method: :delete, data: { confirm: "Are You Sure?" } %>
        • <% end %>
        diff --git a/app/views/tasks/new.html.erb b/app/views/tasks/new.html.erb index 31b8be1e7..50edd31c5 100644 --- a/app/views/tasks/new.html.erb +++ b/app/views/tasks/new.html.erb @@ -1,6 +1,10 @@ -

        - This is the new page. It is for new things. -

        +

        Add a New Task

        + + +<%= render 'form', task: @task %> + + +<%= link_to "List all Tasks", tasks_path %> @@ -17,19 +21,3 @@ --> - - - - -<%= form_for(@task) do |f| %> -<%= f.label :title %> -<%= f.text_field :title %> - -<%= f.label :description %> -<%= f.text_field :description %> - -<%= f.label :date %> -<%= f.date_field :date %> - -<%= f.submit "Press This Button" %> -<% end %> diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb index 5c6369fe6..a7bbe561c 100644 --- a/app/views/tasks/show.html.erb +++ b/app/views/tasks/show.html.erb @@ -1,8 +1,8 @@ -

        HELLO

        -

        This is the show page

        -

        <%= @task.title %>

        +

        <%= @task.title %>

        <%= @task.description %>

        <%= @task.date %>

        - + +

        +<%= link_to "List all Tasks", tasks_path %>

        diff --git a/config/routes.rb b/config/routes.rb index a206ed5f6..3bed9966c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,71 +2,18 @@ # 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' 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' - # resources :books end - # Rails.application.routes.draw do - # get '/tasks', to: 'tasks#index', as: 'tasks' - # get '/tasks/new', to: 'tasks#new', as: 'new_task' - # 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' - # # put '/books/:id', to: 'books#update' - # #task_path(task) - # delete '/tasks/:id', to: 'tasks#destroy' - # # delete '/books/:id', to: 'books#destroy' - # - # - # end # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html - - - # get '/books', to: 'books#index', as: 'books' - # get '/puppies', to: 'puppies#index', at: 'puppies' - - - # get '/books/new', to: 'books#new', as: 'new_book' - #GETS the form to Update or Add Info, but doesn't do the update - - - # get '/books/:id', to: 'books#show', as: 'book' - # if youcall the show method, it finds whatever id you put in and then goes to the tasks/id route - #task_path(task) - - - - # post '/books', to: 'books#create' - - # post '/tasks/new', to: 'tasks#new', as: 'add_task' - - - # , as: 'edit_task' - #This will just bring you to the edit form - # - # get '/books/:id/edit', to: 'books#edit', as: 'edit_book' - - - - ################ - # - #GET /users index users_path page to list all users - # GET /users/1 show user_path(user) page to show user - # GET /users/new new new_user_path page to make a new user (signup) - # POST /users create users_path create a new user - # GET /users/1/edit edit edit_user_path(user) page to edit user with id 1 - # PATCH /users/1 update user_path(user) update user - # DELETE /users/1 destroy user_path(user) delete user - - # - # post '/books/:id/checkout', to: 'books#checkout', as: 'checkout_book' diff --git a/db/development.sqlite3 b/db/development.sqlite3 index b7b01fd200f2dca41d891f71c1af81a3f6df13f7..713f364da55f4db5ab27f924470d094a4395305a 100644 GIT binary patch delta 382 zcmZp8z}WDBae_3X;Y1l{M#GH>3;j(wvKTnn*D~lqjrsu&oGB!KSq1-Umbza%5INFgM(xI_^|fL!mEUzDp5kXTfbnV6&C znvw|?^vf>?d&JOC*T4eiC1V2xBO@yl11m!#Jp)5i3u7Y;86#6YOJhS*bF&myb_U(e KYH>FO86^Pl"6"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 6], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (20.4ms) +Completed 200 OK in 49ms (Views: 38.9ms | ActiveRecord: 0.2ms) + + +Started PATCH "/tasks/6" for 127.0.0.1 at 2017-09-22 10:00:52 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"KrtqOstIu9/e7AP8p/HQ3RQXrpPkJINUBH8yj+CAvgU+sOIlFAF2JtnxVAXyoix0Yy7BwmTJsftIVQw8C0NVhA==", "task"=>{"title"=>"Adding Things", "description"=>"To This", "date"=>"2017-09-13"}, "commit"=>"Update Task", "id"=>"6"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 6], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.4ms) UPDATE "tasks" SET "title" = ?, "description" = ?, "date" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["title", "Adding Things"], ["description", "To This"], ["date", "2017-09-13"], ["updated_at", "2017-09-22 17:00:52.759506"], ["id", 6]] +  (0.9ms) commit transaction +Redirected to http://localhost:3000/tasks/6 +Completed 302 Found in 6ms (ActiveRecord: 1.5ms) + + +Started GET "/tasks/6" for 127.0.0.1 at 2017-09-22 10:00:52 -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 (0.9ms) +Completed 200 OK in 20ms (Views: 15.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/" for 127.0.0.1 at 2017-09-22 10:00:59 -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.0ms) +Completed 200 OK in 28ms (Views: 23.4ms | ActiveRecord: 0.2ms) + + +Started DELETE "/tasks/12" for 127.0.0.1 at 2017-09-22 10:01:05 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"m81oGGPhzEaUgZfwp1CVgcRLha18j0lffDOJlstfZ16RWHgdX+F1b6KDlKSjgG8isabaKXQL5+4GLNoxDVSJSA==", "id"=>"12"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 12], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.9ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 12]] +  (1.3ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 2.5ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:01:05 -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.5ms) +Completed 200 OK in 26ms (Views: 23.1ms | ActiveRecord: 0.2ms) + + +Started DELETE "/tasks/10" for 127.0.0.1 at 2017-09-22 10:01:09 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"TlA/BC7xHI/HRL+i4dZ92V0FpyazqurDvXYLxm/GiKJExS8BEvGlpvFGvPblBod6KOj4orsuRHLHaVhhqc1mtA==", "id"=>"10"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 10]] +  (0.8ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 1.5ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:01: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 (6.8ms) +Completed 200 OK in 38ms (Views: 35.5ms | ActiveRecord: 0.3ms) + + +Started DELETE "/tasks/7" for 127.0.0.1 at 2017-09-22 10:01:12 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"69svBaC2RJ3ng8/47mkwzB0Bfwl0THbrtLIB0tUOEEXhTj8AnLb9tNGBzKzqucpvaOwgjXzI2FrOrVJ1EwX+Uw==", "id"=>"7"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 7], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 7]] +  (2.2ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 2.7ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:01: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 (5.4ms) +Completed 200 OK in 26ms (Views: 23.5ms | ActiveRecord: 0.2ms) + + +Started DELETE "/tasks/9" for 127.0.0.1 at 2017-09-22 10:01:15 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"mX17sCBW8ZqfM4dGrS7gEiugOIlxBDRL41y/ufKjAqyT6Gu1HFZIs6kxhBKp/hqxXk1nDXmAmvqZQ+weNKjsug==", "id"=>"9"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 9], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 9]] +  (1.7ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 5ms (ActiveRecord: 2.4ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:01: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 (4.2ms) +Completed 200 OK in 26ms (Views: 23.3ms | ActiveRecord: 0.2ms) + + +Started DELETE "/tasks/8" for 127.0.0.1 at 2017-09-22 10:01:19 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"Ks9/aqkeyWKZwQ3NsdkiE9ONKLuCfGojpgEUmecJfX0gWm9vlR5wS6/DDpm1CdiwpmB3P4r4xJLcHkc+IQKTaw==", "id"=>"8"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 8]] +  (2.3ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 2.9ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:01:19 -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 (7.2ms) +Completed 200 OK in 26ms (Views: 23.5ms | ActiveRecord: 0.4ms) + + +Started DELETE "/tasks/14" for 127.0.0.1 at 2017-09-22 10:01:23 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"tSxJtqTwFQPeZQcrC/sYjBQFYRuWWjmB+djgRzOJZjC/uVmzmPCsKuhnBH8PK+IvYeg+n57elzCDx7Pg9YKIJg==", "id"=>"14"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 14], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (1.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 14]] +  (0.8ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 2.4ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:01: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 (6.5ms) +Completed 200 OK in 25ms (Views: 22.2ms | ActiveRecord: 0.2ms) + + +Started DELETE "/tasks/15" for 127.0.0.1 at 2017-09-22 10:01:26 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"WUKKobs0+U6e6RWYfPEQO6kiWyWR0c7/s9+i++fT0x1T15qkhzRAZ6jrFsx4IeqY3M8EoZlVYE7JwPFcIdg9Cw==", "id"=>"15"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 15], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 15]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.7ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:01:26 -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 (6.0ms) +Completed 200 OK in 26ms (Views: 23.2ms | ActiveRecord: 0.3ms) + + +Started DELETE "/tasks/17" for 127.0.0.1 at 2017-09-22 10:01:29 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"hJbyW2U4jtoiFkCx+BugA4NVQqGHvHGTpPV8HcN1W5COA+JeWTg38xQUQ+X8y1qg9rgdJY843yLe6i+6BX61hg==", "id"=>"17"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 17], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 17]] +  (1.0ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 4ms (ActiveRecord: 1.6ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:01:29 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (6.4ms) +Completed 200 OK in 26ms (Views: 22.5ms | ActiveRecord: 0.5ms) + + +Started DELETE "/tasks/18" for 127.0.0.1 at 2017-09-22 10:01:32 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"/GKrLzWuQqNOnveXpemkoMC25bhC8Huy2OSZw4eTcbD297sqCa77inic9MOhOV4DtVu6PEp01QOi+8pkQZifpg==", "id"=>"18"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 18], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.6ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 18]] +  (2.7ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 8ms (ActiveRecord: 3.5ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:01: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 (4.9ms) +Completed 200 OK in 22ms (Views: 19.1ms | ActiveRecord: 0.2ms) + + +Started DELETE "/tasks/20" for 127.0.0.1 at 2017-09-22 10:01:35 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"OjJywWvxZ8UB/gYbD6m7TOAljc+j5Mt934R9p6iuNkEwp2LEV/He7Df8BU8LeUHvlcjSS6tgZcylmy4AbqXYVw==", "id"=>"20"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 20], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 20]] +  (2.5ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 3.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:01:35 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.9ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (6.1ms) +Completed 200 OK in 33ms (Views: 26.1ms | ActiveRecord: 0.9ms) + + +Started DELETE "/tasks/19" for 127.0.0.1 at 2017-09-22 10:01:39 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"Ne9rfEQzVLUReDK+W87tocBpY0tmxetsaueIy6k6xdY/ent5eDPtnCd6MepfHhcCtYQ8z25BRd0Q+NtsbzErwA==", "id"=>"19"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 19], ["LIMIT", 1]] +  (0.2ms) begin transaction + SQL (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 19]] +  (2.7ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 3.4ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:01:39 -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 (5.2ms) +Completed 200 OK in 24ms (Views: 20.5ms | ActiveRecord: 0.3ms) + + +Started DELETE "/tasks/23" for 127.0.0.1 at 2017-09-22 10:01:42 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"5lJGZ7Cn2LK0G1gftRD9O/c7JJHPeMSmHxysg4I9qvfsx1ZijKdhm4IZW0uxwAeYgtZ7Fcf8ahdlA/8kRDZE4Q==", "id"=>"23"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 23], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 23]] +  (2.7ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 3.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:01:42 -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 24ms (Views: 21.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks.11" for 127.0.0.1 at 2017-09-22 10:01:44 -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.2ms) +Completed 200 OK in 56ms (Views: 33.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks.11" for 127.0.0.1 at 2017-09-22 10:01:48 -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 (4.0ms) +Completed 200 OK in 55ms (Views: 34.6ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/11/edit" for 127.0.0.1 at 2017-09-22 10:01:49 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"11"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 11], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (3.9ms) +Completed 200 OK in 31ms (Views: 26.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/7" for 127.0.0.1 at 2017-09-22 10:01:55 -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]] +Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=7): + +app/controllers/tasks_controller.rb:21:in `show' +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-22 10:02:04 -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.4ms) +Completed 200 OK in 18ms (Views: 14.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:02:41 -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.9ms) +Completed 200 OK in 23ms (Views: 19.8ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/11" for 127.0.0.1 at 2017-09-22 10:02:43 -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 28ms (Views: 22.8ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/22" for 127.0.0.1 at 2017-09-22 10:02:46 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"22"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 22], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 30ms (Views: 25.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-22 10:03:47 -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: 27.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:03:48 -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 (5.0ms) +Completed 200 OK in 44ms (Views: 39.2ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-22 10:03:52 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (6.5ms) +Completed 200 OK in 40ms (Views: 33.4ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-22 10:06:17 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (2.1ms) +Completed 200 OK in 22ms (Views: 19.2ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:06:18 -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 (13.1ms) +Completed 200 OK in 47ms (Views: 40.2ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-22 10:06:21 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/new.html.erb within layouts/application (1.9ms) +Completed 200 OK in 19ms (Views: 16.5ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:06: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 (4.6ms) +Completed 200 OK in 37ms (Views: 32.6ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/3/edit" for 127.0.0.1 at 2017-09-22 10:06:23 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"3"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/edit.html.erb within layouts/application (1.8ms) +Completed 200 OK in 19ms (Views: 16.5ms | ActiveRecord: 0.1ms) + + +Started PATCH "/tasks/3" for 127.0.0.1 at 2017-09-22 10:06:26 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"M0r82w/WemCRtqjYRa3mPCmdbAKJYdgfrvTZihXn9BJu5SGJGfDENaK0uI6Sc6H2JFSBnw/wWhSYLNld0CJoKA==", "task"=>{"title"=>"Get That", "description"=>"Or This", "date"=>"2017-09-21"}, "commit"=>"Update Task", "id"=>"3"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.1ms) commit transaction +Redirected to http://localhost:3000/tasks/3 +Completed 302 Found in 4ms (ActiveRecord: 0.3ms) + + +Started GET "/tasks/3" for 127.0.0.1 at 2017-09-22 10:06:26 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"3"} + Task Load (0.2ms) 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.6ms) +Completed 200 OK in 21ms (Views: 17.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:17:48 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (1.3ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (19.5ms) +Completed 200 OK in 77ms (Views: 65.1ms | ActiveRecord: 1.3ms) + + +Started GET "/tasks/22" for 127.0.0.1 at 2017-09-22 10:17:50 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"22"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 22], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (2.2ms) +Completed 200 OK in 50ms (Views: 40.6ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-22 10:17:53 -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 (16.5ms) +Completed 200 OK in 84ms (Views: 76.5ms | ActiveRecord: 0.7ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:39:39 -0700 +  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +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 (12.3ms) +Completed 200 OK in 245ms (Views: 231.0ms | ActiveRecord: 1.1ms) + + +Started DELETE "/tasks/21" for 127.0.0.1 at 2017-09-30 15:39:45 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"tYFDlPoMVHBApDX7T3AtRP3lN+inApOpIZrJ+CNh/cDZorTgB6Bw8KNFt2rmMrq47rdON0hVNO4mgeLDBrbSYg==", "id"=>"21"} + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 21], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.5ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 21]] +  (1.9ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 14ms (ActiveRecord: 3.4ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:39:45 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (2.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (16.8ms) +Completed 200 OK in 49ms (Views: 43.3ms | ActiveRecord: 2.5ms) + + +Started DELETE "/tasks/16" for 127.0.0.1 at 2017-09-30 15:39:50 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"OIWRdaO8gu7P8A+IkOAQEoASLQghQBx/6oWnFeNKncdUpmYBXhCmbiwRjRk5oofuk0BU184Xuzjtnowuxp2yZQ==", "id"=>"16"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 16], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 16]] +  (1.9ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 2.4ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:39: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 (2.7ms) +Completed 200 OK in 28ms (Views: 23.2ms | ActiveRecord: 0.2ms) + + +Started DELETE "/tasks/22" for 127.0.0.1 at 2017-09-30 15:39:53 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"jYj7no3WNAmiitAKYpRPIm6+biue1g/+x2pLMetNN3LhqwzqcHoQiUFrUpvL1tjefewX9HGBqLnAcWAKzpoY0A==", "id"=>"22"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 22], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 22]] +  (2.6ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 3.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:39:53 -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 28ms (Views: 24.2ms | ActiveRecord: 0.2ms) + + +Started DELETE "/tasks/11" for 127.0.0.1 at 2017-09-30 15:39:56 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"QaTIiXSC3e7bJhtB6u3BiGBTiQoMhjUpDrU3ejmELUwthz/9iS75bjjHmdBDr1Z0cwHw1ePRkm4JrhxBHFMC7g==", "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]] +  (2.2ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 2.7ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:39:56 -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 (17.2ms) +Completed 200 OK in 44ms (Views: 40.4ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-30 15:39:58 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (21.2ms) + Rendered tasks/new.html.erb within layouts/application (29.1ms) +Completed 200 OK in 53ms (Views: 47.9ms | ActiveRecord: 0.0ms) + + +Started POST "/tasks" for 127.0.0.1 at 2017-09-30 15:40:12 -0700 +Processing by TasksController#create as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"PZV1NwcgqRKB+CGJKdMEY5Gcub7Ffrk3kHTVCttyD52UZT3yujGDkPFgENN2KMeQmvTf+t8V/awD/7hMf7wUQA==", "task"=>{"title"=>"Another Test", "description"=>"Testing Form Partial", "date"=>"2017-11-08"}, "commit"=>"Create Task"} +  (0.1ms) begin transaction + SQL (0.4ms) INSERT INTO "tasks" ("title", "description", "date", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["title", "Another Test"], ["description", "Testing Form Partial"], ["date", "2017-11-08"], ["created_at", "2017-09-30 22:40:12.015832"], ["updated_at", "2017-09-30 22:40:12.015832"]] +  (0.8ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 1.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:40:12 -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 (11.9ms) +Completed 200 OK in 40ms (Views: 35.3ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/24/edit" for 127.0.0.1 at 2017-09-30 15:40:15 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"24"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 24], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (4.5ms) + Rendered tasks/edit.html.erb within layouts/application (8.1ms) +Completed 200 OK in 37ms (Views: 31.1ms | ActiveRecord: 0.1ms) + + +Started PATCH "/tasks/24" for 127.0.0.1 at 2017-09-30 15:40:25 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"dCzc+NlAAvZcAAWaanQa9ez+iAvWVcTXTEPJpQgQzKsQcPgj88PE+MuiYT4Uue1BYlEwM7z9Kj4ohpjI0DonpQ==", "task"=>{"title"=>"Another Test!", "description"=>"Testing Form Partial Editing Now", "date"=>"2017-11-08"}, "commit"=>"Update Task", "id"=>"24"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 24], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.4ms) UPDATE "tasks" SET "title" = ?, "description" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["title", "Another Test!"], ["description", "Testing Form Partial Editing Now"], ["updated_at", "2017-09-30 22:40:25.931576"], ["id", 24]] +  (1.1ms) commit transaction +Redirected to http://localhost:3000/tasks/24 +Completed 302 Found in 7ms (ActiveRecord: 1.9ms) + + +Started GET "/tasks/24" for 127.0.0.1 at 2017-09-30 15:40:25 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"24"} + Task Load (0.4ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 24], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (0.6ms) +Completed 200 OK in 21ms (Views: 16.3ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:45:20 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.1ms) +Completed 200 OK in 47ms (Views: 42.4ms | ActiveRecord: 0.9ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:45:51 -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: 27.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/7" for 127.0.0.1 at 2017-09-30 15:47:04 -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]] +Completed 404 Not Found in 2ms (ActiveRecord: 0.2ms) + + + +ActiveRecord::RecordNotFound (Couldn't find Task with 'id'=7): + +app/controllers/tasks_controller.rb:17:in `show' +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:47:07 -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.5ms) +Completed 200 OK in 22ms (Views: 19.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-30 15:47:16 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (3.7ms) + Rendered tasks/new.html.erb within layouts/application (7.4ms) +Completed 200 OK in 37ms (Views: 34.6ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-30 15:47:22 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.8ms) + Rendered tasks/new.html.erb within layouts/application (8.0ms) +Completed 200 OK in 47ms (Views: 43.5ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:48:47 -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 21ms (Views: 17.4ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-30 15:49:05 -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 37ms (Views: 34.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:49:08 -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 (4.5ms) +Completed 200 OK in 46ms (Views: 42.4ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-09-30 15:49:11 -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/_form.html.erb (3.3ms) + Rendered tasks/edit.html.erb within layouts/application (8.6ms) +Completed 200 OK in 40ms (Views: 34.4ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-09-30 15:49:14 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (6.0ms) + Rendered tasks/new.html.erb within layouts/application (9.5ms) +Completed 200 OK in 35ms (Views: 32.0ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:49: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 (4.2ms) +Completed 200 OK in 39ms (Views: 36.3ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:49:44 -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.3ms) +Completed 200 OK in 51ms (Views: 48.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:49:45 -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.0ms) +Completed 200 OK in 22ms (Views: 19.0ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:50:35 -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 22ms (Views: 18.8ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:51:04 -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 43ms (Views: 39.9ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:51:13 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.6ms) +Completed 200 OK in 44ms (Views: 40.6ms | ActiveRecord: 0.5ms) + + +Started GET "/tasks/1" for 127.0.0.1 at 2017-09-30 15:51:14 -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 37ms (Views: 30.7ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:52:05 -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.8ms) +Completed 200 OK in 36ms (Views: 33.1ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-09-30 15:52:20 -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 40ms (Views: 38.0ms | ActiveRecord: 0.2ms) + + From 58ce9109ccbf307fdd50b7b7d7603d9bb9db3c7b Mon Sep 17 00:00:00 2001 From: Amy Cash Date: Sun, 1 Oct 2017 20:49:20 -0700 Subject: [PATCH 10/12] clean up links a little --- app/assets/stylesheets/tasks.scss | 14 +--- app/views/tasks/index.html.erb | 4 +- db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 106 ++++++++++++++++++++++++++++++ 4 files changed, 111 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/tasks.scss b/app/assets/stylesheets/tasks.scss index e4fc19997..b7cb2ed42 100644 --- a/app/assets/stylesheets/tasks.scss +++ b/app/assets/stylesheets/tasks.scss @@ -21,21 +21,13 @@ h3 { text-align: center; } -.task-links { - // list-style: none; - border: 1px solid red; -} - -.task-data { - list-style: none; +a:link { + color: red; text-decoration: none; - border: 1px solid blue; } -.task-items:link { - text-decoration: none; -} li { + list-style: none; text-decoration: none; } diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index b1191b4df..45709d52c 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -8,9 +8,9 @@ -
          +
            <% @tasks.each do |task| %> -
          • +
          • <%= link_to task.title, task_path(task.id) %> <%= link_to 'edit', edit_task_path(task.id) %> <%= link_to 'delete', task_path(task.id), method: :delete, data: { confirm: "Are You Sure?" } %> diff --git a/db/development.sqlite3 b/db/development.sqlite3 index 713f364da55f4db5ab27f924470d094a4395305a..f8e62ee8591794926a30d3a8998721a496854203 100644 GIT binary patch delta 67 zcmZp8z}WDBae_3X(L@<%Mx%`hi~MCc7}(j@GVsskcj0@-*UqQNzLpmVIYmHlvO<8^ UW|M#`>?{lntV=iZM0^nk0F~Af-T(jq delta 67 zcmZp8z}WDBae_3X;Y1l{M#GH>i~MD>7&zG1GVsskcj0@-*UqQNzLtZ7cP*y~2u@ZA V5Zi1LaD|;EftQ_OGf%`9aR8L<5?=rS diff --git a/log/development.log b/log/development.log index 34b5fb245..495d08190 100644 --- a/log/development.log +++ b/log/development.log @@ -5199,3 +5199,109 @@ Processing by TasksController#index as HTML Completed 200 OK in 40ms (Views: 38.0ms | ActiveRecord: 0.2ms) +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 20:41:00 -0700 +  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +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 (10.8ms) +Completed 200 OK in 251ms (Views: 237.0ms | ActiveRecord: 1.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 20:42:38 -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 (7.4ms) +Completed 200 OK in 68ms (Views: 61.4ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 20:44:18 -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.6ms) +Completed 200 OK in 42ms (Views: 39.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 20:44:45 -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.0ms) +Completed 200 OK in 44ms (Views: 41.9ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-10-01 20:45:38 -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/_form.html.erb (30.7ms) + Rendered tasks/edit.html.erb within layouts/application (34.8ms) +Completed 200 OK in 87ms (Views: 77.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/2/edit" for 127.0.0.1 at 2017-10-01 20:45:38 -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/_form.html.erb (3.6ms) + Rendered tasks/edit.html.erb within layouts/application (6.4ms) +Completed 200 OK in 29ms (Views: 24.7ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 20:45:42 -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.4ms) +Completed 200 OK in 38ms (Views: 34.2ms | ActiveRecord: 0.2ms) + + +Started DELETE "/tasks/13" for 127.0.0.1 at 2017-10-01 20:46:32 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"rLsH4Q08Bp3sS6S2TPEmoUS5W9EivwgqtadLTLAJI2TaM6f7fYr3rktbXq2pTxXYjPOTQHJ9C7JwlTr3zsiEIA==", "id"=>"13"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 13], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (1.3ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 13]] +  (1.9ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 8ms (ActiveRecord: 3.4ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 20:46:32 -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 25ms (Views: 21.7ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/1/edit" for 127.0.0.1 at 2017-10-01 20:46:39 -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/_form.html.erb (3.7ms) + Rendered tasks/edit.html.erb within layouts/application (6.8ms) +Completed 200 OK in 34ms (Views: 30.4ms | ActiveRecord: 0.1ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-10-01 20:46:44 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.8ms) + Rendered tasks/new.html.erb within layouts/application (7.2ms) +Completed 200 OK in 35ms (Views: 29.9ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 20:46:46 -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.7ms) +Completed 200 OK in 49ms (Views: 44.9ms | ActiveRecord: 0.3ms) + + From 3ad0e3144a1a957fc90c126e1f823285593acda0 Mon Sep 17 00:00:00 2001 From: Amy Cash Date: Sun, 1 Oct 2017 22:06:16 -0700 Subject: [PATCH 11/12] Finishing Mark Complete --- app/controllers/tasks_controller.rb | 8 + app/views/tasks/complete.html.erb | 6 + app/views/tasks/index.html.erb | 1 + app/views/tasks/show.html.erb | 5 +- config/routes.rb | 2 + db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 519 ++++++++++++++++++++++++++++ 7 files changed, 538 insertions(+), 3 deletions(-) create mode 100644 app/views/tasks/complete.html.erb diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 6ccf24851..f57fa44bb 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -30,6 +30,14 @@ def update redirect_to task_path(@task) end + def complete + @task = Task.find(params[:id]) + @task.date = Date.today + @task.title = @task.title.upcase! + @task.save + redirect_to('/tasks') + end + def destroy @task = Task.find(params[:id]) @task.destroy diff --git a/app/views/tasks/complete.html.erb b/app/views/tasks/complete.html.erb new file mode 100644 index 000000000..3678badfc --- /dev/null +++ b/app/views/tasks/complete.html.erb @@ -0,0 +1,6 @@ +

            Congratulations You Completed Your Task

            + +<% @task.date = Date.today %> + + +

            <%= link_to "List all Tasks", tasks_path %>

            diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index 45709d52c..e3f82a1ab 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -12,6 +12,7 @@ <% @tasks.each do |task| %>
          • <%= link_to task.title, task_path(task.id) %> + <%= link_to 'mark_complete', complete_task_path(task.id) %> <%= link_to 'edit', edit_task_path(task.id) %> <%= link_to 'delete', task_path(task.id), method: :delete, data: { confirm: "Are You Sure?" } %>
          • diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb index a7bbe561c..94192e5d3 100644 --- a/app/views/tasks/show.html.erb +++ b/app/views/tasks/show.html.erb @@ -1,8 +1,7 @@ -

            <%= @task.title %>

            +

            <%= @task.title %>

            <%= @task.description %>

            <%= @task.date %>

            -

            -<%= link_to "List all Tasks", tasks_path %>

            +

            <%= link_to "List all Tasks", tasks_path %>

            diff --git a/config/routes.rb b/config/routes.rb index 3bed9966c..de4f4982f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -11,6 +11,8 @@ get '/tasks/:id/edit', to: 'tasks#edit', as: 'edit_task' patch '/tasks/:id', to: 'tasks#update' + get '/tasks/:id/complete', to: 'tasks#complete', as: 'complete_task' + delete '/tasks/:id', to: 'tasks#destroy' end diff --git a/db/development.sqlite3 b/db/development.sqlite3 index f8e62ee8591794926a30d3a8998721a496854203..02a79619ff69f1b313066bd2ea90d991c87cda59 100644 GIT binary patch delta 322 zcmZp8z}WDBae_3X`9v9KM)Qpc3;kso7#P@jV;T78^1JZ8<7?+ra|?1(OHv``Tj&~@Onw_H?+&sPY@Ug!l_}6X zb2CFTlN45V23>8Sd2XJ5p1~dpA&$Y`3O=5}Apu4CS*gh-3TgR83XUm>a2FX)&W)3j Vgmd8zG}kjSGcq>V+!j|Q2mlhDQ2qb_ delta 348 zcmZp8z}WDBae_3X(L@<%Mx%`h3;ks|I2hR3*D~+Fn6H}gaUvesJ}m{=JZ>KR*@8W>nubFec2fup05fuXssfu*jIk%EDdm8p@H ziHV+tk&&6D8EzS%#wrGeA_;Z|bzenCN5{PUl8n?Mg^<+Z5=9V^nU}8MmS2>s5Rh0@ zl9`yJ;F^+IA_x-o%P$8TYiOuzU@`e^tb9GtYGVThBcQzoRz{|Jmd1vr=4L6Z>Jw6hab&zxR`vh@ diff --git a/log/development.log b/log/development.log index 495d08190..09f0084fb 100644 --- a/log/development.log +++ b/log/development.log @@ -5305,3 +5305,522 @@ Processing by TasksController#index as HTML Completed 200 OK in 49ms (Views: 44.9ms | ActiveRecord: 0.3ms) +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 20:49:45 -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 (4.1ms) +Completed 200 OK in 38ms (Views: 34.4ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-10-01 20:49:46 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (2.4ms) + Rendered tasks/new.html.erb within layouts/application (5.9ms) +Completed 200 OK in 39ms (Views: 34.4ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 20:57:43 -0700 +  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +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 (12.1ms) +Completed 200 OK in 256ms (Views: 241.1ms | ActiveRecord: 1.1ms) + + +Started GET "/tasks/1/edit" for 127.0.0.1 at 2017-10-01 20:57:46 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"1"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (17.5ms) + Rendered tasks/edit.html.erb within layouts/application (21.5ms) +Completed 200 OK in 58ms (Views: 41.9ms | ActiveRecord: 0.6ms) + + + Task Load (1.7ms) SELECT "tasks".* FROM "tasks" LIMIT ? [["LIMIT", 11]] + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" ASC LIMIT ? [["LIMIT", 1]] +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:23:01 -0700 +  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.5ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (14.5ms) +Completed 200 OK in 240ms (Views: 224.3ms | ActiveRecord: 1.7ms) + + +Started GET "/tasks/2" for 127.0.0.1 at 2017-10-01 21:23:07 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.2ms) 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 33ms (Views: 24.1ms | ActiveRecord: 0.5ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:23:11 -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 (4.0ms) +Completed 200 OK in 35ms (Views: 29.4ms | ActiveRecord: 0.4ms) + + +Started GET "/tasks/2" for 127.0.0.1 at 2017-10-01 21:23:17 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"2"} + Task Load (0.2ms) 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.8ms) +Completed 200 OK in 28ms (Views: 24.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/24" for 127.0.0.1 at 2017-10-01 21:23:27 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"24"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 24], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (2.0ms) +Completed 200 OK in 34ms (Views: 29.2ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:25: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 (3.5ms) +Completed 200 OK in 20ms (Views: 17.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/24/complete" for 127.0.0.1 at 2017-10-01 21:25:04 -0700 + +ActionController::RoutingError (No route matches [GET] "/tasks/24/complete"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:27:58 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.7ms) +Completed 200 OK in 31ms (Views: 25.7ms | ActiveRecord: 0.9ms) + + +Started GET "/tasks/24/complete" for 127.0.0.1 at 2017-10-01 21:28:03 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"24"} + Rendering tasks/complete.html.erb within layouts/application + Rendered tasks/complete.html.erb within layouts/application (0.4ms) +Completed 200 OK in 23ms (Views: 21.3ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/" for 127.0.0.1 at 2017-10-01 21:30:22 -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.9ms) +Completed 200 OK in 21ms (Views: 19.1ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/24/complete" for 127.0.0.1 at 2017-10-01 21:30:24 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"24"} + Rendering tasks/complete.html.erb within layouts/application + Rendered tasks/complete.html.erb within layouts/application (4.1ms) +Completed 500 Internal Server Error in 13ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (undefined method `title' for nil:NilClass): + 1:

            Congratulations You Completed Your Task

            + 2: + 3: + 4:

            <% @task.title = @task.title.upcase%>

            + 5:

            <% @task.description %>

            + 6:

            <% @task.date = Date.today %>

            + 7: + +app/views/tasks/complete.html.erb:4:in `_app_views_tasks_complete_html_erb___331284769446472233_70108410859900' +Started GET "/tasks/" for 127.0.0.1 at 2017-10-01 21:31: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 (4.0ms) +Completed 200 OK in 28ms (Views: 24.8ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-10-01 21:31:04 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (17.0ms) + Rendered tasks/new.html.erb within layouts/application (21.4ms) +Completed 200 OK in 51ms (Views: 45.6ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks/3/edit" for 127.0.0.1 at 2017-10-01 21:31:11 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"3"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (5.2ms) + Rendered tasks/edit.html.erb within layouts/application (9.4ms) +Completed 200 OK in 45ms (Views: 37.3ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/" for 127.0.0.1 at 2017-10-01 21:32: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.9ms) +Completed 200 OK in 25ms (Views: 21.9ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/24/complete" for 127.0.0.1 at 2017-10-01 21:32:13 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"24"} + Rendering tasks/complete.html.erb within layouts/application + Rendered tasks/complete.html.erb within layouts/application (16.4ms) +Completed 500 Internal Server Error in 24ms (ActiveRecord: 0.0ms) + + + +ActionView::Template::Error (undefined method `title' for nil:NilClass): + 1:

            Congratulations You Completed Your Task

            + 2: + 3: + 4:

            <% @task.title = @task.title.upcase%>

            + 5:

            <% @task.description %>

            + 6:

            <% @task.date = Date.today %>

            + 7: + +app/views/tasks/complete.html.erb:4:in `_app_views_tasks_complete_html_erb___331284769446472233_70108376952960' +Started GET "/tasks/" for 127.0.0.1 at 2017-10-01 21:32: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 (2.8ms) +Completed 200 OK in 25ms (Views: 21.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/6" for 127.0.0.1 at 2017-10-01 21:32:52 -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 (0.8ms) +Completed 200 OK in 33ms (Views: 29.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/24/complete" for 127.0.0.1 at 2017-10-01 21:32:55 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"24"} + Rendering tasks/complete.html.erb within layouts/application + Rendered tasks/complete.html.erb within layouts/application (0.8ms) +Completed 200 OK in 20ms (Views: 17.7ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:32:58 -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 (4.3ms) +Completed 200 OK in 33ms (Views: 30.3ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:35:30 -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 (16.6ms) +Completed 200 OK in 43ms (Views: 38.5ms | ActiveRecord: 1.5ms) + + +Started GET "/tasks/24/complete" for 127.0.0.1 at 2017-10-01 21:35:32 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"24"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 24], ["LIMIT", 1]] + Rendering tasks/complete.html.erb within layouts/application + Rendered tasks/complete.html.erb within layouts/application (0.7ms) +Completed 200 OK in 32ms (Views: 24.2ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:35:37 -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.9ms) +Completed 200 OK in 37ms (Views: 33.5ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/24" for 127.0.0.1 at 2017-10-01 21:35:38 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"24"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 24], ["LIMIT", 1]] + Rendering tasks/show.html.erb within layouts/application + Rendered tasks/show.html.erb within layouts/application (1.6ms) +Completed 200 OK in 34ms (Views: 28.9ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:35:45 -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 (4.4ms) +Completed 200 OK in 32ms (Views: 28.8ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:40:39 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.5ms) +Completed 200 OK in 29ms (Views: 24.9ms | ActiveRecord: 1.1ms) + + +Started GET "/tasks/24/complete" for 127.0.0.1 at 2017-10-01 21:40:41 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"24"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 24], ["LIMIT", 1]] + Rendering tasks/complete.html.erb within layouts/application + Rendered tasks/complete.html.erb within layouts/application (205.4ms) +Completed 500 Internal Server Error in 220ms (ActiveRecord: 0.2ms) + + + +ActionView::Template::Error (undefined local variable or method `task' for #<#:0x007f86c07249a0> +Did you mean? @task): + 2: + 3:

            Click to Mark Complete

            + 4: + 5: <%= link_to 'Click to Mark Complete', completed_task_path(task.id) %> + 6: + 7: + 8:

            <%= link_to "List all Tasks", tasks_path %>

            + +app/views/tasks/complete.html.erb:5:in `_app_views_tasks_complete_html_erb___331284769446472233_70108365531720' + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT ? [["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (1.2ms) UPDATE "tasks" SET "date" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["date", "2017-10-01"], ["updated_at", "2017-10-02 04:43:05.227254"], ["id", 24]] +  (1.0ms) commit transaction +  (0.1ms) begin transaction + SQL (1.9ms) UPDATE "tasks" SET "title" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["title", "ANOTHER TEST!"], ["updated_at", "2017-10-02 04:44:01.654979"], ["id", 24]] +  (2.6ms) commit transaction +Started GET "/tasks/24/complete" for 127.0.0.1 at 2017-10-01 21:44:19 -0700 +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +Processing by TasksController#complete as HTML + Parameters: {"id"=>"24"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 24], ["LIMIT", 1]] + Rendering tasks/complete.html.erb within layouts/application + Rendered tasks/complete.html.erb within layouts/application (218.0ms) +Completed 500 Internal Server Error in 249ms (ActiveRecord: 1.0ms) + + + +ActionView::Template::Error (undefined local variable or method `task' for #<#:0x007f8e7e0e9610> +Did you mean? @task): + 2: + 3:

            Click to Mark Complete

            + 4: + 5: <%= link_to 'Click to Mark Complete', completed_task_path(task.id) %> + 6: + 7: + 8:

            <%= link_to "List all Tasks", tasks_path %>

            + +app/views/tasks/complete.html.erb:5:in `_app_views_tasks_complete_html_erb__1563798932262929423_70124988537820' +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:44:26 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (3.7ms) +Completed 200 OK in 178ms (Views: 174.7ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks/24/complete" for 127.0.0.1 at 2017-10-01 21:44:28 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"24"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 24], ["LIMIT", 1]] + Rendering tasks/complete.html.erb within layouts/application + Rendered tasks/complete.html.erb within layouts/application (188.5ms) +Completed 500 Internal Server Error in 199ms (ActiveRecord: 0.2ms) + + + +ActionView::Template::Error (undefined local variable or method `task' for #<#:0x007f8e7bbdab08> +Did you mean? @task): + 2: + 3:

            Click to Mark Complete

            + 4: + 5: <%= link_to 'Click to Mark Complete', completed_task_path(task.id) %> + 6: + 7: + 8:

            <%= link_to "List all Tasks", tasks_path %>

            + +app/views/tasks/complete.html.erb:5:in `_app_views_tasks_complete_html_erb__1563798932262929423_70125009060040' +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:44:31 -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 24ms (Views: 21.4ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/24/edit" for 127.0.0.1 at 2017-10-01 21:45:38 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"24"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 24], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (36.7ms) + Rendered tasks/edit.html.erb within layouts/application (39.6ms) +Completed 200 OK in 77ms (Views: 72.2ms | ActiveRecord: 0.1ms) + + +Started PATCH "/tasks/24" for 127.0.0.1 at 2017-10-01 21:45:53 -0700 +Processing by TasksController#update as HTML + Parameters: {"utf8"=>"✓", "authenticity_token"=>"lKpdSHgGPc/BZU7YsDsSmPfBICkLQJihPChW6ISNELJ1BPXc52CoBPC9BSuQKUJjVk2AkQRQE/ghF3YP1bMQww==", "task"=>{"title"=>"ANOTHER TEST!", "description"=>"testing mark complete", "date"=>"2017-08-24"}, "commit"=>"Update Task", "id"=>"24"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 24], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.4ms) UPDATE "tasks" SET "description" = ?, "date" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["description", "testing mark complete"], ["date", "2017-08-24"], ["updated_at", "2017-10-02 04:45:53.176164"], ["id", 24]] +  (1.8ms) commit transaction +Redirected to http://localhost:3000/tasks/24 +Completed 302 Found in 8ms (ActiveRecord: 2.5ms) + + +Started GET "/tasks/24" for 127.0.0.1 at 2017-10-01 21:45:53 -0700 +Processing by TasksController#show as HTML + Parameters: {"id"=>"24"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 24], ["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: 29.0ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:45:55 -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 (6.2ms) +Completed 200 OK in 37ms (Views: 33.5ms | ActiveRecord: 0.6ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:49:05 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (16.5ms) +Completed 200 OK in 42ms (Views: 36.3ms | ActiveRecord: 0.9ms) + + +Started GET "/tasks/24/complete" for 127.0.0.1 at 2017-10-01 21:49:07 -0700 + +ActionController::RoutingError (No route matches [GET] "/tasks/24/complete"): + +actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' +web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app' +web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch' +web-console (3.5.1) lib/web_console/middleware.rb:18:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' +railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' +activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged' +railties (5.1.4) lib/rails/rack/logger.rb:24:in `call' +sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call' +rack (2.0.3) lib/rack/method_override.rb:22:in `call' +rack (2.0.3) lib/rack/runtime.rb:22:in `call' +activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call' +actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call' +rack (2.0.3) lib/rack/sendfile.rb:111:in `call' +railties (5.1.4) lib/rails/engine.rb:522:in `call' +puma (3.10.0) lib/puma/configuration.rb:225:in `call' +puma (3.10.0) lib/puma/server.rb:605:in `handle_request' +puma (3.10.0) lib/puma/server.rb:437:in `process_client' +puma (3.10.0) lib/puma/server.rb:301:in `block in run' +puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread' +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:58:10 -0700 +Processing by TasksController#index as HTML + Rendering tasks/index.html.erb within layouts/application + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" + Rendered tasks/index.html.erb within layouts/application (8.7ms) +Completed 200 OK in 35ms (Views: 30.0ms | ActiveRecord: 0.9ms) + + +Started GET "/tasks/6/complete" for 127.0.0.1 at 2017-10-01 21:58:13 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"6"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 6], ["LIMIT", 1]] +  (0.0ms) begin transaction + SQL (1.2ms) UPDATE "tasks" SET "date" = ?, "title" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["date", "2017-10-01"], ["title", "ADDING THINGS"], ["updated_at", "2017-10-02 04:58:13.100840"], ["id", 6]] +  (2.3ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 8ms (ActiveRecord: 3.8ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:58: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 (2.9ms) +Completed 200 OK in 25ms (Views: 20.9ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/5/complete" for 127.0.0.1 at 2017-10-01 21:58:17 -0700 +Processing by TasksController#complete as HTML + Parameters: {"id"=>"5"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 5], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.4ms) UPDATE "tasks" SET "date" = ?, "title" = ?, "updated_at" = ? WHERE "tasks"."id" = ? [["date", "2017-10-01"], ["title", "FINISH TASK LIST"], ["updated_at", "2017-10-02 04:58:17.262305"], ["id", 5]] +  (2.0ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 6ms (ActiveRecord: 2.7ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 21:58:17 -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 (5.5ms) +Completed 200 OK in 26ms (Views: 22.6ms | ActiveRecord: 0.6ms) + + +Started GET "/tasks/5/edit" for 127.0.0.1 at 2017-10-01 21:58:20 -0700 +Processing by TasksController#edit as HTML + Parameters: {"id"=>"5"} + Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 5], ["LIMIT", 1]] + Rendering tasks/edit.html.erb within layouts/application + Rendered tasks/_form.html.erb (5.3ms) + Rendered tasks/edit.html.erb within layouts/application (8.8ms) +Completed 200 OK in 32ms (Views: 26.5ms | ActiveRecord: 0.1ms) + + From 75867f1eca56a60569c1b25883eb35616c798d40 Mon Sep 17 00:00:00 2001 From: Amy Cash Date: Sun, 1 Oct 2017 22:19:13 -0700 Subject: [PATCH 12/12] Finish Complete Method --- app/views/tasks/index.html.erb | 1 + db/development.sqlite3 | Bin 28672 -> 28672 bytes log/development.log | 82 +++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+) diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index e3f82a1ab..62e98882b 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -6,6 +6,7 @@ <%= link_to "New Task", new_task_path %> +

            Uppercase Tasks are Complete

              diff --git a/db/development.sqlite3 b/db/development.sqlite3 index 02a79619ff69f1b313066bd2ea90d991c87cda59..9eb838cdf66bea1d3fff0fbe59181d2e913cd7e7 100644 GIT binary patch delta 136 zcmZp8z}WDBae_3X)kGO*Myrhp3;ktzcQCN=#xn5F<#*wG$JfrM$Q#SMgI9r51Oz85 z1c+@m33$U}Yc0vn00fSXMh1rFx`qb221W`7rdEbVRwm|p2Il4_#wNIBCdbA`vjBBx MZr&5?EW{`Y0QNN>bpQYW delta 136 zcmZp8z}WDBae_3X`9v9KM)Qpc3;kso7#P@jV;T78^1JZ8<7?+r*rgMhO7r0v}lb diff --git a/log/development.log b/log/development.log index 09f0084fb..f46aefa10 100644 --- a/log/development.log +++ b/log/development.log @@ -5824,3 +5824,85 @@ Processing by TasksController#edit as HTML Completed 200 OK in 32ms (Views: 26.5ms | ActiveRecord: 0.1ms) +  (0.2ms) begin transaction + SQL (1.2ms) INSERT INTO "tasks" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2017-10-02 05:12:47.077434"], ["updated_at", "2017-10-02 05:12:47.077434"]] +  (1.0ms) commit transaction +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 22:15:46 -0700 +  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +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 (10.5ms) +Completed 200 OK in 233ms (Views: 220.2ms | ActiveRecord: 0.8ms) + + +Started DELETE "/tasks/25" for 127.0.0.1 at 2017-10-01 22:15:51 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"4BRCNE6iNbRLZtzglXbxP232ttJ7tcQ7cNGJe6Yb+haWnOIuPhTEh+x2JvtwyMJGpbx+Qyt3x6O14/jA2NpdUg==", "id"=>"25"} + Task Load (0.3ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 25], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 25]] +  (1.0ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 9ms (ActiveRecord: 2.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 22:15:51 -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 22ms (Views: 19.0ms | ActiveRecord: 0.3ms) + + +Started DELETE "/tasks/24" for 127.0.0.1 at 2017-10-01 22:15:55 -0700 +Processing by TasksController#destroy as HTML + Parameters: {"authenticity_token"=>"CovioB0lkvbatyrDv7l75lezo1szoASPNOd3N+bcQ/J8A0K6bZNjxX2n0NhaB0ifn/lrymNiBxfx1QaMmB3ktg==", "id"=>"24"} + Task Load (0.2ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ? [["id", 24], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.4ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 24]] +  (2.9ms) commit transaction +Redirected to http://localhost:3000/tasks +Completed 302 Found in 7ms (ActiveRecord: 3.5ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 22:15: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 (3.2ms) +Completed 200 OK in 28ms (Views: 24.2ms | ActiveRecord: 0.3ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 22:17:02 -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.7ms) +Completed 200 OK in 28ms (Views: 25.3ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 22:17: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.8ms) +Completed 200 OK in 22ms (Views: 18.6ms | ActiveRecord: 0.2ms) + + +Started GET "/tasks/new" for 127.0.0.1 at 2017-10-01 22:17:40 -0700 +Processing by TasksController#new as HTML + Rendering tasks/new.html.erb within layouts/application + Rendered tasks/_form.html.erb (24.7ms) + Rendered tasks/new.html.erb within layouts/application (28.5ms) +Completed 200 OK in 53ms (Views: 50.8ms | ActiveRecord: 0.0ms) + + +Started GET "/tasks" for 127.0.0.1 at 2017-10-01 22:17:42 -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 (4.8ms) +Completed 200 OK in 33ms (Views: 29.7ms | ActiveRecord: 0.6ms) + +