Apply Rails/RequestReferer rubocop rule

This commit is contained in:
Javi Martín
2019-06-22 22:35:58 +02:00
parent a5ba13b599
commit daa86ca3fc
5 changed files with 6 additions and 6 deletions

View File

@@ -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")