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
|
def allowed_params
|
||||||
[:link, :segment_recipient, translation_params(AdminNotification)]
|
[:link, :segment_recipient, translation_params(AdminNotification)]
|
||||||
end
|
end
|
||||||
|
|
||||||
def resource
|
|
||||||
AdminNotification.find(params[:id])
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -44,8 +44,4 @@ class Admin::BannersController < Admin::BaseController
|
|||||||
translation_params(Banner),
|
translation_params(Banner),
|
||||||
web_section_ids: []]
|
web_section_ids: []]
|
||||||
end
|
end
|
||||||
|
|
||||||
def resource
|
|
||||||
@banner ||= Banner.find(params[:id])
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -45,8 +45,4 @@ class Admin::Legislation::DraftVersionsController < Admin::Legislation::BaseCont
|
|||||||
def allowed_params
|
def allowed_params
|
||||||
[:status, :final_version, translation_params(Legislation::DraftVersion)]
|
[:status, :final_version, translation_params(Legislation::DraftVersion)]
|
||||||
end
|
end
|
||||||
|
|
||||||
def resource
|
|
||||||
@draft_version
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -26,8 +26,4 @@ class Admin::Legislation::HomepagesController < Admin::Legislation::BaseControll
|
|||||||
def allowed_params
|
def allowed_params
|
||||||
[:homepage, :homepage_enabled, translation_params(::Legislation::Process)]
|
[:homepage, :homepage_enabled, translation_params(::Legislation::Process)]
|
||||||
end
|
end
|
||||||
|
|
||||||
def resource
|
|
||||||
@process || ::Legislation::Process.find(params[:id])
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -77,8 +77,4 @@ class Admin::Legislation::ProcessesController < Admin::Legislation::BaseControll
|
|||||||
image_attributes: image_attributes
|
image_attributes: image_attributes
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
def resource
|
|
||||||
@process || ::Legislation::Process.find(params[:id])
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -55,8 +55,4 @@ class Admin::Legislation::QuestionsController < Admin::Legislation::BaseControll
|
|||||||
translation_params(::Legislation::QuestionOption)]
|
translation_params(::Legislation::QuestionOption)]
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
def resource
|
|
||||||
@question || ::Legislation::Question.find(params[:id])
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -15,10 +15,6 @@ class Admin::SiteCustomization::InformationTextsController < Admin::SiteCustomiz
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def resource
|
|
||||||
I18nContent.find(content_params[:id])
|
|
||||||
end
|
|
||||||
|
|
||||||
def content_params
|
def content_params
|
||||||
params.require(:contents).values
|
params.require(:contents).values
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -43,8 +43,4 @@ class Admin::SiteCustomization::PagesController < Admin::SiteCustomization::Base
|
|||||||
|
|
||||||
[*attributes, translation_params(SiteCustomization::Page)]
|
[*attributes, translation_params(SiteCustomization::Page)]
|
||||||
end
|
end
|
||||||
|
|
||||||
def resource
|
|
||||||
SiteCustomization::Page.find(params[:id])
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user