This method was used by controllers using the `Translatable` concern. We
forgot to remove it in commit 71601bd3f.
30 lines
793 B
Ruby
30 lines
793 B
Ruby
class Admin::Legislation::HomepagesController < Admin::Legislation::BaseController
|
|
include Translatable
|
|
|
|
load_and_authorize_resource :process, class: "Legislation::Process"
|
|
|
|
def edit
|
|
end
|
|
|
|
def update
|
|
if @process.update(process_params)
|
|
link = legislation_process_path(@process)
|
|
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")
|
|
render :edit
|
|
end
|
|
end
|
|
|
|
private
|
|
|
|
def process_params
|
|
params.require(:legislation_process).permit(allowed_params)
|
|
end
|
|
|
|
def allowed_params
|
|
[:homepage, :homepage_enabled, translation_params(::Legislation::Process)]
|
|
end
|
|
end
|