Remove obsolete resource method in controllers
This method was used by controllers using the `Translatable` concern. We
forgot to remove it in commit 71601bd3f.
This commit is contained in:
@@ -69,8 +69,4 @@ class Admin::AdminNotificationsController < Admin::BaseController
|
||||
def allowed_params
|
||||
[:link, :segment_recipient, translation_params(AdminNotification)]
|
||||
end
|
||||
|
||||
def resource
|
||||
AdminNotification.find(params[:id])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -44,8 +44,4 @@ class Admin::BannersController < Admin::BaseController
|
||||
translation_params(Banner),
|
||||
web_section_ids: []]
|
||||
end
|
||||
|
||||
def resource
|
||||
@banner ||= Banner.find(params[:id])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -45,8 +45,4 @@ class Admin::Legislation::DraftVersionsController < Admin::Legislation::BaseCont
|
||||
def allowed_params
|
||||
[:status, :final_version, translation_params(Legislation::DraftVersion)]
|
||||
end
|
||||
|
||||
def resource
|
||||
@draft_version
|
||||
end
|
||||
end
|
||||
|
||||
@@ -26,8 +26,4 @@ class Admin::Legislation::HomepagesController < Admin::Legislation::BaseControll
|
||||
def allowed_params
|
||||
[:homepage, :homepage_enabled, translation_params(::Legislation::Process)]
|
||||
end
|
||||
|
||||
def resource
|
||||
@process || ::Legislation::Process.find(params[:id])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -77,8 +77,4 @@ class Admin::Legislation::ProcessesController < Admin::Legislation::BaseControll
|
||||
image_attributes: image_attributes
|
||||
]
|
||||
end
|
||||
|
||||
def resource
|
||||
@process || ::Legislation::Process.find(params[:id])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -55,8 +55,4 @@ class Admin::Legislation::QuestionsController < Admin::Legislation::BaseControll
|
||||
translation_params(::Legislation::QuestionOption)]
|
||||
]
|
||||
end
|
||||
|
||||
def resource
|
||||
@question || ::Legislation::Question.find(params[:id])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,10 +15,6 @@ class Admin::SiteCustomization::InformationTextsController < Admin::SiteCustomiz
|
||||
|
||||
private
|
||||
|
||||
def resource
|
||||
I18nContent.find(content_params[:id])
|
||||
end
|
||||
|
||||
def content_params
|
||||
params.require(:contents).values
|
||||
end
|
||||
|
||||
@@ -43,8 +43,4 @@ class Admin::SiteCustomization::PagesController < Admin::SiteCustomization::Base
|
||||
|
||||
[*attributes, translation_params(SiteCustomization::Page)]
|
||||
end
|
||||
|
||||
def resource
|
||||
SiteCustomization::Page.find(params[:id])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user