Skip to content

Commit

Permalink
remove render_500_nosolr action (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed May 9, 2022
1 parent 80aee6a commit 1888a5c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 83 deletions.
15 changes: 0 additions & 15 deletions app/controllers/concerns/enju_library/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module Controller
before_action :store_current_location, unless: :devise_controller?
rescue_from Pundit::NotAuthorizedError, with: :render_403
# rescue_from ActiveRecord::RecordNotFound, with: :render_404
rescue_from Errno::ECONNREFUSED, with: :render_500_nosolr
# rescue_from ActionView::MissingTemplate, with: :render_404_invalid_format
helper_method :filtered_params
end
Expand Down Expand Up @@ -66,20 +65,6 @@ def render_500
end
end

def render_500_nosolr
Rails.logger.fatal("please confirm that the Solr is running.")
return if performed?

# flash[:notice] = t('page.connection_failed')
respond_to do |format|
format.html {render template: "page/500_nosolr", layout: false, status: :internal_server_error}
# format.html.phone {render template: "page/500_nosolr", layout: false, status: 500}
format.xml {render template: 'page/500', status: :internal_server_error}
format.json { render json: {"error": "server_error"} }
format.rss {render template: 'page/500.xml', status: :internal_server_error}
end
end

def after_sign_in_path_for(resource)
session[:locale] = nil
super
Expand Down
2 changes: 1 addition & 1 deletion app/models/library_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def email
# created_at :datetime
# updated_at :datetime
# admin_networks :text
# allow_bookmark_external_url :boolean default(FALSE), not null
# url :string default("http://localhost:3000/")
# settings :text
# html_snippet :text
Expand All @@ -110,7 +111,6 @@ def email
# header_logo_file_size :bigint
# header_logo_updated_at :datetime
# header_logo_meta :text
# allow_bookmark_external_url :boolean default(FALSE), not null
# login_banner :text
# footer_banner :text
#
66 changes: 0 additions & 66 deletions app/views/page/500_nosolr.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion spec/fixtures/library_groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ one:
# created_at :datetime
# updated_at :datetime
# admin_networks :text
# allow_bookmark_external_url :boolean default(FALSE), not null
# url :string default("http://localhost:3000/")
# settings :text
# html_snippet :text
Expand All @@ -44,7 +45,6 @@ one:
# header_logo_file_size :bigint
# header_logo_updated_at :datetime
# header_logo_meta :text
# allow_bookmark_external_url :boolean default(FALSE), not null
# login_banner :text
# footer_banner :text
#
Expand Down

0 comments on commit 1888a5c

Please sign in to comment.