Hack added to speed up better_errors
This commit is contained in:
parent
193d44f89a
commit
b1e8ebd9b4
1 changed files with 8 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ class ApplicationController < ActionController::Base
|
|||
# filter_parameter_logging :password
|
||||
|
||||
before_action :get_current_users_screenshots, :debian_sso
|
||||
before_action :better_errors_hack, if: -> { Rails.env.development? }
|
||||
|
||||
# Query for packages that were uploaded by the current user.
|
||||
# As AAA is not yet implemented it means looking for uploads
|
||||
|
|
@ -50,4 +51,11 @@ class ApplicationController < ActionController::Base
|
|||
def after_sign_in_path_for(resource)
|
||||
my_welcome_path
|
||||
end
|
||||
|
||||
# better_errors gets extremely slow without this hack
|
||||
# see: https://github.com/charliesome/better_errors/issues/341
|
||||
def better_errors_hack
|
||||
env['puma.config'].options.user_options.delete :app
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue