Class: Spina::Admin::Pro::NotFoundErrorsController
- Inherits:
-
AdminController
- Object
- AdminController
- Spina::Admin::Pro::NotFoundErrorsController
- Defined in:
- app/controllers/spina/admin/pro/not_found_errors_controller.rb
Instance Method Summary collapse
Instance Method Details
#ignored ⇒ Object
11 12 13 |
# File 'app/controllers/spina/admin/pro/not_found_errors_controller.rb', line 11 def ignored @not_found_errors = Spina::Pro::NotFoundError.ignored.order(visits: :desc, last_visited: :desc).page(params[:page]).per(50) end |
#index ⇒ Object
5 6 7 8 9 |
# File 'app/controllers/spina/admin/pro/not_found_errors_controller.rb', line 5 def index t("spina.pro.rewrite_rules.title") @not_found_errors = Spina::Pro::NotFoundError.not_ignored.order(visits: :desc, last_visited: :desc).page(params[:page]).per(50) scope_search(params[:search]) end |
#update ⇒ Object
15 16 17 18 19 |
# File 'app/controllers/spina/admin/pro/not_found_errors_controller.rb', line 15 def update @not_found_error = Spina::Pro::NotFoundError.find(params[:id]) @not_found_error.update(not_found_error_params) render turbo_stream: turbo_stream.update(@not_found_error, partial: "not_found_error", object: @not_found_error) end |