Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Done #1103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Done #1103

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class StatsController < ApplicationController
class Admin::StatsController < ApplicationController

def index
@post_count = Post.count
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

resources :posts, only: %i[index show new create edit update]

get '/admin/stats', to: 'stats#index'
namespace :admin do
resources :stats, only: [:index]
end

root 'posts#index'
end
153 changes: 153 additions & 0 deletions log/development.log
Original file line number Diff line number Diff line change
Expand Up @@ -4470,3 +4470,156 @@ ActionController::RoutingError (No route matches [GET] "/stats"):
Rendered /Users/scottcreynolds/.rvm/gems/ruby-2.1.2/gems/web-console-2.2.1/lib/web_console/templates/main.js.erb within layouts/javascript (0.2ms)
Rendered /Users/scottcreynolds/.rvm/gems/ruby-2.1.2/gems/web-console-2.2.1/lib/web_console/templates/error_page.js.erb within layouts/javascript (0.4ms)
Rendered /Users/scottcreynolds/.rvm/gems/ruby-2.1.2/gems/web-console-2.2.1/lib/web_console/templates/index.html.erb (34.6ms)
Started GET "/" for ::1 at 2020-06-04 16:25:47 -0500
DEPRECATION WARNING: ActiveRecord::Base.raise_in_transactional_callbacks= is deprecated, has no effect and will be removed without replacement. (called from block (3 levels) in <class:Railtie> at /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/activerecord-5.0.7.2/lib/active_record/railtie.rb:113)
ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by PostsController#index as HTML
Rendering posts/index.html.erb within layouts/application
Post Load (0.2ms) SELECT "posts".* FROM "posts"
Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
Rendered posts/index.html.erb within layouts/application (46.4ms)
Completed 200 OK in 739ms (Views: 711.6ms | ActiveRecord: 1.2ms)


Started GET "/assets/jquery_ujs.self-784a997f6726036b1993eb2217c9cb558e1cbb801c6da88105588c56f13b466a.js?body=1" for ::1 at 2020-06-04 16:25:48 -0500
Started GET "/assets/turbolinks.self-569ee74eaa15c1e2019317ff770b8769b1ec033a0f572a485f64c82ddc8f989e.js?body=1" for ::1 at 2020-06-04 16:25:48 -0500
Started GET "/assets/jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js?body=1" for ::1 at 2020-06-04 16:25:48 -0500
Started GET "/admin" for ::1 at 2020-06-04 16:26:00 -0500

ActionController::RoutingError (No route matches [GET] "/admin"):

actionpack (5.0.7.2) lib/action_dispatch/middleware/debug_exceptions.rb:53: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 `catch'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.0.7.2) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.0.7.2) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.0.7.2) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.0.7.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.0.7.2) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.0.7.2) lib/rails/rack/logger.rb:24:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/request_id.rb:24:in `call'
rack (2.2.2) lib/rack/method_override.rb:24:in `call'
rack (2.2.2) lib/rack/runtime.rb:22:in `call'
activesupport (5.0.7.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/static.rb:136:in `call'
rack (2.2.2) lib/rack/sendfile.rb:110:in `call'
railties (5.0.7.2) lib/rails/engine.rb:522:in `call'
rack (2.2.2) lib/rack/handler/webrick.rb:95:in `service'
/Users/luisherrera/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/webrick/httpserver.rb:140:in `service'
/Users/luisherrera/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/webrick/httpserver.rb:96:in `run'
/Users/luisherrera/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/webrick/server.rb:307:in `block in start_thread'
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (5.6ms)
Rendered collection of /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [15 times] (6.1ms)
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (43.4ms)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.6ms)
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (98.5ms)
DEPRECATION WARNING: Accessing mime types via constants is deprecated. Please change `Mime::HTML` to `Mime[:html]`. (called from acceptable_content_type? at /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/middleware.rb:58)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/index.html.erb
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/_markup.html.erb (1.6ms)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/console.js.erb within layouts/javascript
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string (1.5ms)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string (0.2ms)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/style.css.erb within layouts/inlined_string
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/style.css.erb within layouts/inlined_string (0.2ms)
DEPRECATION WARNING: Accessing mime types via constants is deprecated. Please change `Mime::WEB_CONSOLE_V2` to `Mime[:web_console_v2]`. (called from ___sers_luisherrera__rvm_gems_ruby_______gems_web_console_______lib_web_console_templates_console_js_erb__6893366552733436_70207811623800 at /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/console.js.erb:491)
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/console.js.erb within layouts/javascript (80.4ms)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/main.js.erb within layouts/javascript
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/main.js.erb within layouts/javascript (2.2ms)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/error_page.js.erb within layouts/javascript
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/error_page.js.erb within layouts/javascript (1.4ms)
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/index.html.erb (116.0ms)
Started GET "/admin/home" for ::1 at 2020-06-04 16:26:05 -0500

ActionController::RoutingError (No route matches [GET] "/admin/home"):

actionpack (5.0.7.2) lib/action_dispatch/middleware/debug_exceptions.rb:53: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 `catch'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.0.7.2) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.0.7.2) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.0.7.2) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.0.7.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.0.7.2) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.0.7.2) lib/rails/rack/logger.rb:24:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/request_id.rb:24:in `call'
rack (2.2.2) lib/rack/method_override.rb:24:in `call'
rack (2.2.2) lib/rack/runtime.rb:22:in `call'
activesupport (5.0.7.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/static.rb:136:in `call'
rack (2.2.2) lib/rack/sendfile.rb:110:in `call'
railties (5.0.7.2) lib/rails/engine.rb:522:in `call'
rack (2.2.2) lib/rack/handler/webrick.rb:95:in `service'
/Users/luisherrera/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/webrick/httpserver.rb:140:in `service'
/Users/luisherrera/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/webrick/httpserver.rb:96:in `run'
/Users/luisherrera/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/webrick/server.rb:307:in `block in start_thread'
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (0.7ms)
Rendered collection of /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [15 times] (3.0ms)
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.0ms)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.7ms)
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (19.4ms)
DEPRECATION WARNING: Accessing mime types via constants is deprecated. Please change `Mime::HTML` to `Mime[:html]`. (called from acceptable_content_type? at /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/middleware.rb:58)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/index.html.erb
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/_markup.html.erb (0.3ms)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/console.js.erb within layouts/javascript
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string (0.2ms)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string (0.2ms)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/style.css.erb within layouts/inlined_string
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/style.css.erb within layouts/inlined_string (0.2ms)
DEPRECATION WARNING: Accessing mime types via constants is deprecated. Please change `Mime::WEB_CONSOLE_V2` to `Mime[:web_console_v2]`. (called from ___sers_luisherrera__rvm_gems_ruby_______gems_web_console_______lib_web_console_templates_console_js_erb__6893366552733436_70207858257340 at /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/console.js.erb:491)
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/console.js.erb within layouts/javascript (13.3ms)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/main.js.erb within layouts/javascript
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/main.js.erb within layouts/javascript (0.2ms)
Rendering /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/error_page.js.erb within layouts/javascript
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/error_page.js.erb within layouts/javascript (0.2ms)
Rendered /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/web-console-2.3.0/lib/web_console/templates/index.html.erb (27.6ms)
Started GET "/admin/stats" for ::1 at 2020-06-04 16:26:09 -0500
Processing by StatsController#index as HTML
 (0.2ms) SELECT COUNT(*) FROM "posts"
 (0.1ms) SELECT COUNT(*) FROM "authors"
Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" DESC LIMIT ? [["LIMIT", 1]]
Rendering stats/index.html.erb within layouts/application
Rendered stats/index.html.erb within layouts/application (0.5ms)
Completed 200 OK in 15ms (Views: 11.8ms | ActiveRecord: 0.4ms)


Started GET "/" for ::1 at 2020-06-04 16:37:22 -0500
DEPRECATION WARNING: ActiveRecord::Base.raise_in_transactional_callbacks= is deprecated, has no effect and will be removed without replacement. (called from block (3 levels) in <class:Railtie> at /Users/luisherrera/.rvm/gems/ruby-2.6.1/gems/activerecord-5.0.7.2/lib/active_record/railtie.rb:113)
ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by PostsController#index as HTML
Rendering posts/index.html.erb within layouts/application
Post Load (0.1ms) SELECT "posts".* FROM "posts"
Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
Rendered posts/index.html.erb within layouts/application (39.1ms)
Completed 200 OK in 294ms (Views: 282.8ms | ActiveRecord: 1.2ms)


Started GET "/admin/stats" for ::1 at 2020-06-04 16:37:30 -0500
Processing by Admin::StatsController#index as HTML
 (0.2ms) SELECT COUNT(*) FROM "posts"
 (0.2ms) SELECT COUNT(*) FROM "authors"
Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" DESC LIMIT ? [["LIMIT", 1]]
Rendering admin/stats/index.html.erb within layouts/application
Rendered admin/stats/index.html.erb within layouts/application (0.4ms)
Completed 200 OK in 16ms (Views: 12.5ms | ActiveRecord: 0.5ms)


1 change: 0 additions & 1 deletion tmp/pids/server.pid

This file was deleted.