diff --git a/app/controllers/books_controller.rb b/app/controllers/books_controller.rb index e71eb27fc5..e6fb8cf06a 100644 --- a/app/controllers/books_controller.rb +++ b/app/controllers/books_controller.rb @@ -45,7 +45,8 @@ def destroy def rank @book = Book.find(params[:id]) - @book.rank + rank = @book.rank += 1 + @book.update(rank: rank) redirect_to books_path end end diff --git a/app/views/books/show.html.erb b/app/views/books/show.html.erb index 168a1a4aa4..51d52df867 100644 --- a/app/views/books/show.html.erb +++ b/app/views/books/show.html.erb @@ -1,17 +1,3 @@ -<%= @book.title %> -<%= @book.author %> -<%= @book.rank %> - -Edit - -Delete - -View All Movies - -View All Media - - -

Title: <%= @book.title %>

@@ -22,8 +8,6 @@ View All Media Ranking: <%= @book.rank %> -

<%= @book.description %>

- <%= link_to "Upvote", rank_book_path(@book.id), class: "btn btn-primary", method: :put %> <%= link_to "Edit #{@book.title}", edit_book_path(@book.id), class: "btn btn-default" %> <%= link_to "Delete", book_path(@book.id), class: "btn btn-danger", method: :delete %> diff --git a/db/development.sqlite3 b/db/development.sqlite3 index bd33fee7f1..bbc30cecdd 100644 Binary files a/db/development.sqlite3 and b/db/development.sqlite3 differ diff --git a/log/development.log b/log/development.log index 9d93f0ba8d..9a9502c7d7 100644 --- a/log/development.log +++ b/log/development.log @@ -3130,3 +3130,637 @@ Processing by BooksController#index as HTML Completed 200 OK in 26ms (Views: 22.7ms | ActiveRecord: 0.2ms) +Started GET "/books" for ::1 at 2016-07-20 23:18:29 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.3ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (5.8ms) +Completed 200 OK in 27ms (Views: 23.4ms | ActiveRecord: 0.7ms) + + +Started GET "/" for ::1 at 2016-07-20 23:18:31 -0700 +Processing by HomeController#index as HTML + Rendering home/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC LIMIT ? [["LIMIT", 10]] + Album Load (0.2ms) SELECT "albums".* FROM "albums" ORDER BY "albums"."rank" DESC LIMIT ? [["LIMIT", 10]] + Movie Load (0.2ms) SELECT "movies".* FROM "movies" ORDER BY "movies"."rank" DESC LIMIT ? [["LIMIT", 10]] + Rendered home/index.html.erb within layouts/application (12.6ms) +Completed 200 OK in 38ms (Views: 31.2ms | ActiveRecord: 1.3ms) + + +Started GET "/books/10" for ::1 at 2016-07-20 23:18:32 -0700 +Processing by BooksController#show as HTML + Parameters: {"id"=>"10"} + Book Load (0.4ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] + Rendering books/show.html.erb within layouts/application + Rendered books/show.html.erb within layouts/application (9.3ms) +Completed 500 Internal Server Error in 16ms (ActiveRecord: 0.4ms) + + +DEPRECATION WARNING: #original_exception is deprecated. Use #cause instead. (called from initialize at /Users/jadevance/.rvm/gems/ruby-2.3.1/gems/better_errors-2.1.1/lib/better_errors/raised_exception.rb:7) +DEPRECATION WARNING: #original_exception is deprecated. Use #cause instead. (called from initialize at /Users/jadevance/.rvm/gems/ruby-2.3.1/gems/better_errors-2.1.1/lib/better_errors/raised_exception.rb:8) + +NoMethodError - undefined method `description' for # +Did you mean? description_metadata: + activemodel (5.0.0) lib/active_model/attribute_methods.rb:433:in `method_missing' + app/views/books/show.html.erb:25:in `_app_views_books_show_html_erb___3252457241165280910_70144502727580' + actionview (5.0.0) lib/action_view/template.rb:158:in `block in render' + activesupport (5.0.0) lib/active_support/notifications.rb:166:in `instrument' + actionview (5.0.0) lib/action_view/template.rb:348:in `instrument' + actionview (5.0.0) lib/action_view/template.rb:156:in `render' + actionview (5.0.0) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template' + actionview (5.0.0) lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument' + activesupport (5.0.0) lib/active_support/notifications.rb:164:in `block in instrument' + activesupport (5.0.0) lib/active_support/notifications/instrumenter.rb:21:in `instrument' + activesupport (5.0.0) lib/active_support/notifications.rb:164:in `instrument' + actionview (5.0.0) lib/action_view/renderer/abstract_renderer.rb:41:in `instrument' + actionview (5.0.0) lib/action_view/renderer/template_renderer.rb:53:in `block in render_template' + actionview (5.0.0) lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout' + actionview (5.0.0) lib/action_view/renderer/template_renderer.rb:52:in `render_template' + actionview (5.0.0) lib/action_view/renderer/template_renderer.rb:14:in `render' + actionview (5.0.0) lib/action_view/renderer/renderer.rb:42:in `render_template' + actionview (5.0.0) lib/action_view/renderer/renderer.rb:23:in `render' + actionview (5.0.0) lib/action_view/rendering.rb:103:in `_render_template' + actionpack (5.0.0) lib/action_controller/metal/streaming.rb:217:in `_render_template' + actionview (5.0.0) lib/action_view/rendering.rb:83:in `render_to_body' + actionpack (5.0.0) lib/action_controller/metal/rendering.rb:52:in `render_to_body' + actionpack (5.0.0) lib/action_controller/metal/renderers.rb:144:in `render_to_body' + actionpack (5.0.0) lib/abstract_controller/rendering.rb:26:in `render' + actionpack (5.0.0) lib/action_controller/metal/rendering.rb:36:in `render' + actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render' + activesupport (5.0.0) lib/active_support/core_ext/benchmark.rb:12:in `block in ms' + /Users/jadevance/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/benchmark.rb:308:in `realtime' + activesupport (5.0.0) lib/active_support/core_ext/benchmark.rb:12:in `ms' + actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:44:in `block in render' + actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime' + activerecord (5.0.0) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime' + actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:43:in `render' + actionpack (5.0.0) lib/action_controller/metal/implicit_render.rb:36:in `default_render' + actionpack (5.0.0) lib/action_controller/metal/basic_implicit_render.rb:4:in `block in send_action' + actionpack (5.0.0) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action' + actionpack (5.0.0) lib/abstract_controller/base.rb:188:in `process_action' + actionpack (5.0.0) lib/action_controller/metal/rendering.rb:30:in `process_action' + actionpack (5.0.0) lib/abstract_controller/callbacks.rb:20:in `block in process_action' + activesupport (5.0.0) lib/active_support/callbacks.rb:126:in `call' + activesupport (5.0.0) lib/active_support/callbacks.rb:506:in `block (2 levels) in compile' + activesupport (5.0.0) lib/active_support/callbacks.rb:455:in `call' + activesupport (5.0.0) lib/active_support/callbacks.rb:101:in `__run_callbacks__' + activesupport (5.0.0) lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks' + activesupport (5.0.0) lib/active_support/callbacks.rb:90:in `run_callbacks' + actionpack (5.0.0) lib/abstract_controller/callbacks.rb:19:in `process_action' + actionpack (5.0.0) lib/action_controller/metal/rescue.rb:20:in `process_action' + actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action' + activesupport (5.0.0) lib/active_support/notifications.rb:164:in `block in instrument' + activesupport (5.0.0) lib/active_support/notifications/instrumenter.rb:21:in `instrument' + activesupport (5.0.0) lib/active_support/notifications.rb:164:in `instrument' + actionpack (5.0.0) lib/action_controller/metal/instrumentation.rb:30:in `process_action' + actionpack (5.0.0) lib/action_controller/metal/params_wrapper.rb:248:in `process_action' + activerecord (5.0.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action' + actionpack (5.0.0) lib/abstract_controller/base.rb:126:in `process' + actionview (5.0.0) lib/action_view/rendering.rb:30:in `process' + actionpack (5.0.0) lib/action_controller/metal.rb:190:in `dispatch' + actionpack (5.0.0) lib/action_controller/metal.rb:262:in `dispatch' + actionpack (5.0.0) lib/action_dispatch/routing/route_set.rb:50:in `dispatch' + actionpack (5.0.0) lib/action_dispatch/routing/route_set.rb:32:in `serve' + actionpack (5.0.0) lib/action_dispatch/journey/router.rb:39:in `block in serve' + actionpack (5.0.0) lib/action_dispatch/journey/router.rb:26:in `serve' + actionpack (5.0.0) lib/action_dispatch/routing/route_set.rb:725:in `call' + rack (2.0.1) lib/rack/etag.rb:25:in `call' + rack (2.0.1) lib/rack/conditional_get.rb:25:in `call' + rack (2.0.1) lib/rack/head.rb:12:in `call' + rack (2.0.1) lib/rack/session/abstract/id.rb:222:in `context' + rack (2.0.1) lib/rack/session/abstract/id.rb:216:in `call' + actionpack (5.0.0) lib/action_dispatch/middleware/cookies.rb:613:in `call' + activerecord (5.0.0) lib/active_record/migration.rb:552:in `call' + actionpack (5.0.0) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call' + activesupport (5.0.0) lib/active_support/callbacks.rb:97:in `__run_callbacks__' + activesupport (5.0.0) lib/active_support/callbacks.rb:750:in `_run_call_callbacks' + activesupport (5.0.0) lib/active_support/callbacks.rb:90:in `run_callbacks' + actionpack (5.0.0) lib/action_dispatch/middleware/callbacks.rb:36:in `call' + actionpack (5.0.0) lib/action_dispatch/middleware/executor.rb:12:in `call' + actionpack (5.0.0) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' + better_errors (2.1.1) lib/better_errors/middleware.rb:84:in `protected_app_call' + better_errors (2.1.1) lib/better_errors/middleware.rb:79:in `better_errors_call' + better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call' + actionpack (5.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call' + web-console (2.3.0) lib/web_console/middleware.rb:28:in `block in call' + web-console (2.3.0) lib/web_console/middleware.rb:18:in `call' + actionpack (5.0.0) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' + railties (5.0.0) lib/rails/rack/logger.rb:36:in `call_app' + railties (5.0.0) lib/rails/rack/logger.rb:24:in `block in call' + activesupport (5.0.0) lib/active_support/tagged_logging.rb:70:in `block in tagged' + activesupport (5.0.0) lib/active_support/tagged_logging.rb:26:in `tagged' + activesupport (5.0.0) lib/active_support/tagged_logging.rb:70:in `tagged' + railties (5.0.0) lib/rails/rack/logger.rb:24:in `call' + sprockets-rails (3.1.1) lib/sprockets/rails/quiet_assets.rb:13:in `call' + actionpack (5.0.0) lib/action_dispatch/middleware/request_id.rb:24:in `call' + rack (2.0.1) lib/rack/method_override.rb:22:in `call' + rack (2.0.1) lib/rack/runtime.rb:22:in `call' + activesupport (5.0.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' + actionpack (5.0.0) lib/action_dispatch/middleware/executor.rb:12:in `call' + actionpack (5.0.0) lib/action_dispatch/middleware/static.rb:136:in `call' + rack (2.0.1) lib/rack/sendfile.rb:111:in `call' + railties (5.0.0) lib/rails/engine.rb:522:in `call' + puma (3.4.0) lib/puma/configuration.rb:224:in `call' + puma (3.4.0) lib/puma/server.rb:569:in `handle_request' + puma (3.4.0) lib/puma/server.rb:406:in `process_client' + puma (3.4.0) lib/puma/server.rb:271:in `block in run' + puma (3.4.0) lib/puma/thread_pool.rb:114:in `block in spawn_thread' + +Started POST "/__better_errors/78caea3dd4176941/variables" for ::1 at 2016-07-20 23:18:32 -0700 +Started GET "/books/10" for ::1 at 2016-07-20 23:18:56 -0700 +Processing by BooksController#show as HTML + Parameters: {"id"=>"10"} + Book Load (0.3ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] + Rendering books/show.html.erb within layouts/application + Rendered books/show.html.erb within layouts/application (1.0ms) +Completed 200 OK in 23ms (Views: 21.4ms | ActiveRecord: 0.3ms) + + +Started PUT "/books/10/rank" for ::1 at 2016-07-20 23:19:13 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"JGBRUnK0170dtgPeYzX3GoQaAJ68m4Vk8p9paRuFLwqYA5dW8RIGuIO8tOO9buvAnwjFA7HdfYF8ZxdQ9Gkxng==", "id"=>"10"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +Redirected to http://localhost:3000/books +Completed 302 Found in 1ms (ActiveRecord: 0.1ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:19:13 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.3ms) +Completed 200 OK in 24ms (Views: 22.6ms | ActiveRecord: 0.1ms) + + +Started PUT "/books/10/rank" for ::1 at 2016-07-20 23:19:16 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"NhPb09cOE2YAAWeXD5O6sguDXZXX/1hHlIerBXHtekqKcB3XVKjCY54L0KrRyKZoEJGYCNq5oKIaf9U8ngFk3g==", "id"=>"10"} + Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +Redirected to http://localhost:3000/books +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:19:16 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 24ms (Views: 22.4ms | ActiveRecord: 0.2ms) + + +Started PUT "/books/10/rank" for ::1 at 2016-07-20 23:19:16 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"jhFQDwBsoixc1s56kEN+Nf3ZnaThfzpLjUIPgzWr4cAycpYLg8pzKcLceUdOGGLv5stYOew5wq4DunG62kf/VA==", "id"=>"10"} + Book Load (0.3ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +Redirected to http://localhost:3000/books +Completed 302 Found in 1ms (ActiveRecord: 0.3ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:19:16 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.1ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.4ms) +Completed 200 OK in 26ms (Views: 24.1ms | ActiveRecord: 0.1ms) + + +Started GET "/books/10" for ::1 at 2016-07-20 23:19:17 -0700 +Processing by BooksController#show as HTML + Parameters: {"id"=>"10"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] + Rendering books/show.html.erb within layouts/application + Rendered books/show.html.erb within layouts/application (1.0ms) +Completed 200 OK in 21ms (Views: 19.0ms | ActiveRecord: 0.1ms) + + +Started GET "/books/10" for ::1 at 2016-07-20 23:19:54 -0700 +Processing by BooksController#show as HTML + Parameters: {"id"=>"10"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] + Rendering books/show.html.erb within layouts/application + Rendered books/show.html.erb within layouts/application (0.9ms) +Completed 200 OK in 27ms (Views: 19.4ms | ActiveRecord: 0.6ms) + + +Started PUT "/books/10/rank" for ::1 at 2016-07-20 23:19:56 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"BC99qtRI2S5r/Ygl1N7zejskp6G3ZjFe14YaW4JAM9K4TLuuV+4IK/X3PxgKhe+gIDZiPLogybtZfmRibawtRg==", "id"=>"10"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +Redirected to http://localhost:3000/books +Completed 302 Found in 1ms (ActiveRecord: 0.1ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:19:56 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.3ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.5ms) +Completed 200 OK in 25ms (Views: 22.9ms | ActiveRecord: 0.3ms) + + +Started PUT "/books/10/rank" for ::1 at 2016-07-20 23:19:58 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"zmLJprjBavITKx/bC7vtDb3MGzA4dtQpFT5nJsldE9tyAQ+iO2e7940hqObV4PHXpt7erTUwLMybxhkfJrENTw==", "id"=>"10"} + Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +Redirected to http://localhost:3000/books +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:19:58 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.3ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.9ms) +Completed 200 OK in 25ms (Views: 23.2ms | ActiveRecord: 0.3ms) + + +Started PUT "/books/10/rank" for ::1 at 2016-07-20 23:19:58 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"44Wnw+TPMdBK066W7/3RvriUaM6y0qQsLrvVtPR9Ke1f5mHHZ2ng1dTZGasxps1ko4atU7+UXMmgQ6uNG5E3eQ==", "id"=>"10"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +Redirected to http://localhost:3000/books +Completed 302 Found in 1ms (ActiveRecord: 0.1ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:19:58 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.1ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.1ms) +Completed 200 OK in 24ms (Views: 22.1ms | ActiveRecord: 0.1ms) + + +Started PUT "/books/10/rank" for ::1 at 2016-07-20 23:19:59 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"uJoCa+YHtW4IPxFeABt7Lq3oqCkp6k8VCPYdBkbtvGQE+cRvZaFka5Y1pmPeQGf0tvpttCSst/CGDmM/qQGi8A==", "id"=>"10"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +Redirected to http://localhost:3000/books +Completed 302 Found in 1ms (ActiveRecord: 0.1ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:19:59 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.1ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (1.9ms) +Completed 200 OK in 24ms (Views: 22.5ms | ActiveRecord: 0.1ms) + + +Started PUT "/books/10/rank" for ::1 at 2016-07-20 23:19:59 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"oJwxgNedZJ3m21FJ9nLB0MoC79irPpHKwkDk5Ty0NZQc//eEVDu1mHjR5nQoKd0K0RAqRaZ4aS9MuJrc01grAA==", "id"=>"10"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +Redirected to http://localhost:3000/books +Completed 302 Found in 1ms (ActiveRecord: 0.1ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:19:59 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.4ms) +Completed 200 OK in 23ms (Views: 21.6ms | ActiveRecord: 0.2ms) + + +Started PUT "/books/10/rank" for ::1 at 2016-07-20 23:19:59 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"FJheeLBf2MApGNUFQURRWvgnDB5p4o4XJ7xMd8y6cbao+5h8M/kJxbcSYjifH02A4zXJg2SkdvKpRDJOI1ZvIg==", "id"=>"10"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +Redirected to http://localhost:3000/books +Completed 302 Found in 1ms (ActiveRecord: 0.1ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:19:59 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.4ms) +Completed 200 OK in 26ms (Views: 24.1ms | ActiveRecord: 0.2ms) + + +Started PUT "/books/10/rank" for ::1 at 2016-07-20 23:19:59 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"XCmZ2UkUamx1ykHgE7UomDv8i8TkbClhUaDNVcRWsmngSl/dyrK7aevA9t3N7jRCIO5OWekq0YTfWLNsK7qs/Q==", "id"=>"10"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +Redirected to http://localhost:3000/books +Completed 302 Found in 1ms (ActiveRecord: 0.1ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:19:59 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.4ms) +Completed 200 OK in 26ms (Views: 24.3ms | ActiveRecord: 0.2ms) + + +Started PUT "/books/10/rank" for ::1 at 2016-07-20 23:19:59 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"+uwcKfzac6+k6TxqgiBmTanhG3+BZXoZ39EGVOr4sWVGj9otf3yiqjrji1dce3qXsvPe4owjgvxRKXhtBRSv8Q==", "id"=>"10"} + Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +Redirected to http://localhost:3000/books +Completed 302 Found in 1ms (ActiveRecord: 0.2ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:19:59 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.3ms) +Completed 200 OK in 27ms (Views: 25.0ms | ActiveRecord: 0.2ms) + + +Started GET "/books/10" for ::1 at 2016-07-20 23:20:01 -0700 +Processing by BooksController#show as HTML + Parameters: {"id"=>"10"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] + Rendering books/show.html.erb within layouts/application + Rendered books/show.html.erb within layouts/application (1.0ms) +Completed 200 OK in 24ms (Views: 21.2ms | ActiveRecord: 0.1ms) + + +Started GET "/books/10" for ::1 at 2016-07-20 23:21:53 -0700 +Processing by BooksController#show as HTML + Parameters: {"id"=>"10"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] + Rendering books/show.html.erb within layouts/application + Rendered books/show.html.erb within layouts/application (1.2ms) +Completed 200 OK in 27ms (Views: 18.4ms | ActiveRecord: 0.7ms) + + +Started PUT "/books/10/rank" for ::1 at 2016-07-20 23:21:54 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"1Uh2+Lgif7HEpYZ9QoWMlzorgmHv76EryeOOXI/M6JRpK7D8O4SutFqvMUCc3pBNITlH/OKpWc5HG/BlYCD2AA==", "id"=>"10"} + Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +  (0.0ms) begin transaction + SQL (0.3ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 101], ["updated_at", 2016-07-21 06:21:54 UTC], ["id", 10]] +  (1.4ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 6ms (ActiveRecord: 2.0ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:21:54 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.4ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (3.5ms) +Completed 200 OK in 24ms (Views: 21.7ms | ActiveRecord: 0.4ms) + + +Started PUT "/books/9/rank" for ::1 at 2016-07-20 23:22:24 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"sBFZVg7sPqtbvkQwLezNiIgOT3hqEkM9Sxiunqfz4vYMcp9SjUrvrsW08w3zt9FSkxyK5WdUu9jF4NCnSB/8Yg==", "id"=>"9"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 9], ["LIMIT", 1]] +  (0.0ms) begin transaction + SQL (0.3ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 91], ["updated_at", 2016-07-21 06:22:24 UTC], ["id", 9]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 10ms (ActiveRecord: 2.2ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:22:24 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.2ms) +Completed 200 OK in 23ms (Views: 21.3ms | ActiveRecord: 0.2ms) + + +Started PUT "/books/7/rank" for ::1 at 2016-07-20 23:22:25 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"IGs0VVyQcPdBbpiFRqSEJZvBxJfBbw+9+GkUqCV0IjmcCPJR3zah8t9kL7iY/5j/gNMBCswp91h2kWqRypg8rQ==", "id"=>"7"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 7], ["LIMIT", 1]] +  (0.0ms) begin transaction + SQL (0.2ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 71], ["updated_at", 2016-07-21 06:22:25 UTC], ["id", 7]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 4ms (ActiveRecord: 1.6ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:22:25 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.6ms) +Completed 200 OK in 26ms (Views: 24.8ms | ActiveRecord: 0.2ms) + + +Started PUT "/books/7/rank" for ::1 at 2016-07-20 23:22:26 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"s8M/Y3tTxU/+w6HhoyIv1w1QMOXB4+YM7qmj/hoUQXkPoPln+PUUSmDJFtx9eTMNFkL1eMylHulgUd3H9fhf7Q==", "id"=>"7"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 7], ["LIMIT", 1]] +  (0.0ms) begin transaction + SQL (0.2ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 72], ["updated_at", 2016-07-21 06:22:26 UTC], ["id", 7]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 4ms (ActiveRecord: 1.5ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:22:26 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.1ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (1.9ms) +Completed 200 OK in 25ms (Views: 23.2ms | ActiveRecord: 0.1ms) + + +Started PUT "/books/7/rank" for ::1 at 2016-07-20 23:22:26 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"raY7xc4wC+7kVyGGmAIdDIGnJDlf6BhkQ85didp/A6cRxf3BTZba63pdlrtGWQHWmrXhpFKu4IHNNiOwNZMdMw==", "id"=>"7"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 7], ["LIMIT", 1]] +  (0.0ms) begin transaction + SQL (0.2ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 73], ["updated_at", 2016-07-21 06:22:26 UTC], ["id", 7]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 4ms (ActiveRecord: 1.6ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:22:26 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.5ms) +Completed 200 OK in 22ms (Views: 20.8ms | ActiveRecord: 0.2ms) + + +Started PUT "/books/7/rank" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"tBxmnxSaqJSl/aRlovsfQAbOnYVtdcSsSVYYXxpt4lcIf6Cblzx5kTv3E1h8oAOaHdxYGGAzPEnHrmZm9YH8ww==", "id"=>"7"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 7], ["LIMIT", 1]] +  (0.0ms) begin transaction + SQL (0.5ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 74], ["updated_at", 2016-07-21 06:22:27 UTC], ["id", 7]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 5ms (ActiveRecord: 1.9ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (4.5ms) +Completed 200 OK in 35ms (Views: 33.5ms | ActiveRecord: 0.2ms) + + +Started PUT "/books/7/rank" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"H2YgdruYJEtle7ymktfdBV+zrnujD2pkWFr1pGnWoP6jBeZyOD71TvtxC5tMjMHfRKFr5q5JkoHWooudhjq+ag==", "id"=>"7"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 7], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.3ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 75], ["updated_at", 2016-07-21 06:22:27 UTC], ["id", 7]] +  (1.1ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 4ms (ActiveRecord: 1.5ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.1ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (4.3ms) +Completed 200 OK in 27ms (Views: 24.1ms | ActiveRecord: 0.1ms) + + +Started PUT "/books/7/rank" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"vfn5gzAw+2KlexbzJbTUKx3/UiJ5NppX0zkcHo7tuiUBmj+Hs5YqZztxoc7778jxBu2Xv3RwYrJdwWInYQGksQ==", "id"=>"7"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 7], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.3ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 76], ["updated_at", 2016-07-21 06:22:27 UTC], ["id", 7]] +  (1.3ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 4ms (ActiveRecord: 1.8ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.0ms) +Completed 200 OK in 26ms (Views: 24.6ms | ActiveRecord: 0.2ms) + + +Started PUT "/books/7/rank" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"hhnUTOdTUA3igbfmdd7F22SwyeYakiYc07MdfcLHTOI6ehJIZPWBCHyLANurhdkBf6IMexfU3vldS2NELStSdg==", "id"=>"7"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 7], ["LIMIT", 1]] +  (0.0ms) begin transaction + SQL (0.2ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 77], ["updated_at", 2016-07-21 06:22:27 UTC], ["id", 7]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 4ms (ActiveRecord: 1.6ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (4.9ms) +Completed 200 OK in 26ms (Views: 24.2ms | ActiveRecord: 0.2ms) + + +Started PUT "/books/7/rank" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"QERu52Wfr2cnOvbEmkwrBphuLC5VriOhWLOQe7hjTNf8J6jj5jl+YrkwQflEFzfcg3zps1jo20TWS+5CV49SQw==", "id"=>"7"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 7], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.2ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 78], ["updated_at", 2016-07-21 06:22:27 UTC], ["id", 7]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 4ms (ActiveRecord: 1.6ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (1.1ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (3.3ms) +Completed 200 OK in 27ms (Views: 24.8ms | ActiveRecord: 1.1ms) + + +Started PUT "/books/7/rank" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"ey1B3f+EkkPUBDtN2J8Jn6XJKAk1wPR5hSWjJs1BLL/HTofZfCJDRkoOjHAGxBVFvtvtlDiGDJwL3d0fIq0yKw==", "id"=>"7"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 7], ["LIMIT", 1]] +  (0.0ms) begin transaction + SQL (0.2ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 79], ["updated_at", 2016-07-21 06:22:27 UTC], ["id", 7]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 4ms (ActiveRecord: 1.5ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (3.6ms) +Completed 200 OK in 28ms (Views: 26.2ms | ActiveRecord: 0.2ms) + + +Started PUT "/books/7/rank" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"O9uZ0WA5BRfpimAaLnhZIOMyKfk3i0Um3LsDdJYKN72HuF/V45/UEneA1yfwI0X6+CDsZDrNvcNSQ31NeeYpKQ==", "id"=>"7"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 7], ["LIMIT", 1]] +  (0.0ms) begin transaction + SQL (0.2ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 80], ["updated_at", 2016-07-21 06:22:27 UTC], ["id", 7]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 4ms (ActiveRecord: 1.6ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:22:27 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.1ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (5.3ms) +Completed 200 OK in 27ms (Views: 25.7ms | ActiveRecord: 0.1ms) + + +Started PUT "/books/8/rank" for ::1 at 2016-07-20 23:22:28 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"VqT6kzsKBJ21B/9UQyRllhVYsyG7IUhZKjyfN8OXu/PqxzyXuKzVmCsNSGmdf3lMDkp2vLZnsLykxOEOLHulZw==", "id"=>"8"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 8], ["LIMIT", 1]] +  (0.0ms) begin transaction + SQL (0.3ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 81], ["updated_at", 2016-07-21 06:22:28 UTC], ["id", 8]] +  (1.2ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 4ms (ActiveRecord: 1.5ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:22:28 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.0ms) +Completed 200 OK in 26ms (Views: 25.0ms | ActiveRecord: 0.2ms) + + +Started GET "/books/10" for ::1 at 2016-07-20 23:22:29 -0700 +Processing by BooksController#show as HTML + Parameters: {"id"=>"10"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] + Rendering books/show.html.erb within layouts/application + Rendered books/show.html.erb within layouts/application (1.4ms) +Completed 200 OK in 25ms (Views: 23.0ms | ActiveRecord: 0.1ms) + + +Started PUT "/books/10/rank" for ::1 at 2016-07-20 23:22:31 -0700 +Processing by BooksController#rank as HTML + Parameters: {"authenticity_token"=>"/rNg0NbwRDeOAx7cuIrM3X/0OwiNZwXkIshAmTV9GJJC0KbUVVaVMhAJqeFm0dAHZOb+lYAh/QGsMD6g2pEGBg==", "id"=>"10"} + Book Load (0.1ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 10], ["LIMIT", 1]] +  (0.0ms) begin transaction + SQL (0.2ms) UPDATE "books" SET "rank" = ?, "updated_at" = ? WHERE "books"."id" = ? [["rank", 102], ["updated_at", 2016-07-21 06:22:31 UTC], ["id", 10]] +  (1.1ms) commit transaction +Redirected to http://localhost:3000/books +Completed 302 Found in 4ms (ActiveRecord: 1.4ms) + + +Started GET "/books" for ::1 at 2016-07-20 23:22:31 -0700 +Processing by BooksController#index as HTML + Rendering books/index.html.erb within layouts/application + Book Load (0.2ms) SELECT "books".* FROM "books" ORDER BY "books"."rank" DESC + Rendered books/index.html.erb within layouts/application (2.7ms) +Completed 200 OK in 25ms (Views: 23.3ms | ActiveRecord: 0.2ms) + +