diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-08 20:36:01 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-08 20:36:01 +0200 |
commit | 85d89b472dff2c3d06801dbd42f91c325d21a434 (patch) | |
tree | b348297bf48c63f906cdcdbc1ff573203afb560a /config | |
parent | a4cc966476852542f445793b60c67ad3682976e5 (diff) |
Optimized n+1 queries in accounts Atom and HTML views
Added stack trace for SQL queries in development Removed badly thought out accounts/lookup API
Diffstat (limited to 'config')
-rw-r--r-- | config/environments/development.rb | 6 | ||||
-rw-r--r-- | config/routes.rb | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb index d0ff03754..3a2ab2a0e 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -59,9 +59,9 @@ Rails.application.configure do config.action_mailer.delivery_method = :letter_opener config.after_initialize do - Bullet.enable = true + Bullet.enable = true Bullet.bullet_logger = true - Bullet.rails_logger = true + Bullet.rails_logger = false Bullet.add_whitelist type: :n_plus_one_query, class_name: 'User', association: :account end @@ -71,3 +71,5 @@ end require 'sidekiq/testing' Sidekiq::Testing.inline! + +ActiveRecordQueryTrace.enabled = true diff --git a/config/routes.rb b/config/routes.rb index 6201a4ee7..297426f6a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -56,10 +56,6 @@ Rails.application.routes.draw do resources :media, only: [:create] resources :accounts, only: [:show] do - collection do - get :lookup, to: 'accounts/lookup#index', as: :lookup - end - member do get :statuses get :followers |