diff --git a/app/controllers/admin/communication/blocks/headings_controller.rb b/app/controllers/admin/communication/blocks/headings_controller.rb index 329ee29613482c15cdf36951e393e74e8e287d19..e10f042ba50884e81f8c78b89fb9a32927de4d78 100644 --- a/app/controllers/admin/communication/blocks/headings_controller.rb +++ b/app/controllers/admin/communication/blocks/headings_controller.rb @@ -14,7 +14,7 @@ class Admin::Communication::Blocks::HeadingsController < Admin::Communication::B end def new - @heading.about = Polymorphic.find params, :about + @heading.about = PolymorphicObjectFinder.find params, :about breadcrumb end diff --git a/app/controllers/admin/communication/blocks_controller.rb b/app/controllers/admin/communication/blocks_controller.rb index d81db939f8557d1cad29bbba7de251d4c20b33b7..7adcae290de87a5f482f19bf437bf736767059c1 100644 --- a/app/controllers/admin/communication/blocks_controller.rb +++ b/app/controllers/admin/communication/blocks_controller.rb @@ -15,7 +15,7 @@ class Admin::Communication::BlocksController < Admin::Communication::Application end def new - @block.about = Polymorphic.find params, :about + @block.about = PolymorphicObjectFinder.find params, :about breadcrumb end diff --git a/app/services/polymorphic.rb b/app/services/polymorphic_object_finder.rb similarity index 93% rename from app/services/polymorphic.rb rename to app/services/polymorphic_object_finder.rb index cd848e94ebcb6789e05f52e73caba5809c6544a5..47bf78dcc2dc60a45d67211efcac6dc71819e2ff 100644 --- a/app/services/polymorphic.rb +++ b/app/services/polymorphic_object_finder.rb @@ -1,4 +1,4 @@ -class Polymorphic +class PolymorphicObjectFinder # @block.about = Polymorphic.find params, :about # Rails uses ActiveRecord::Inheritance#polymorphic_name to hydrate the about_type. # Example: A Block for a Communication::Website::Page::Home will have about_type = "Communication::Website::Page"