diff --git a/.rubocop.yml b/.rubocop.yml index 218cdc615..a23458f4d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -150,9 +150,6 @@ Rails/ReadWriteAttribute: Rails/RedundantReceiverInWithOptions: Enabled: true -Rails/RequestReferer: - Enabled: true - Rails/ReversibleMigration: Enabled: true diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml index 6ea9cd9f3..db624cd91 100644 --- a/.rubocop_basic.yml +++ b/.rubocop_basic.yml @@ -138,6 +138,9 @@ Rails/Presence: Rails/RelativeDateConstant: Enabled: true +Rails/RequestReferer: + Enabled: true + Rails/TimeZone: Enabled: true diff --git a/app/controllers/admin/legislation/homepages_controller.rb b/app/controllers/admin/legislation/homepages_controller.rb index 72ff890e9..6cc2062a8 100644 --- a/app/controllers/admin/legislation/homepages_controller.rb +++ b/app/controllers/admin/legislation/homepages_controller.rb @@ -9,7 +9,7 @@ class Admin::Legislation::HomepagesController < Admin::Legislation::BaseControll def update if @process.update(process_params) link = legislation_process_path(@process).html_safe - redirect_back(fallback_location: (request.referrer || root_path), + redirect_back(fallback_location: (request.referer || root_path), notice: t("admin.legislation.processes.update.notice", link: link)) else flash.now[:error] = t("admin.legislation.processes.update.error") diff --git a/app/controllers/admin/legislation/processes_controller.rb b/app/controllers/admin/legislation/processes_controller.rb index ae1cea8a0..4c3b0f6e0 100644 --- a/app/controllers/admin/legislation/processes_controller.rb +++ b/app/controllers/admin/legislation/processes_controller.rb @@ -35,7 +35,7 @@ class Admin::Legislation::ProcessesController < Admin::Legislation::BaseControll set_tag_list link = legislation_process_path(@process).html_safe - redirect_back(fallback_location: (request.referrer || root_path), + redirect_back(fallback_location: (request.referer || root_path), notice: t("admin.legislation.processes.update.notice", link: link)) else flash.now[:error] = t("admin.legislation.processes.update.error") diff --git a/app/controllers/admin/poll/questions/answers/videos_controller.rb b/app/controllers/admin/poll/questions/answers/videos_controller.rb index 3e76531d8..c5c6f14be 100644 --- a/app/controllers/admin/poll/questions/answers/videos_controller.rb +++ b/app/controllers/admin/poll/questions/answers/videos_controller.rb @@ -38,7 +38,7 @@ class Admin::Poll::Questions::Answers::VideosController < Admin::Poll::BaseContr else t("flash.actions.destroy.error") end - redirect_back(fallback_location: (request.referrer || root_path), notice: notice) + redirect_back(fallback_location: (request.referer || root_path), notice: notice) end private