Skip to content
Snippets Groups Projects
Commit b1160872 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Better name

parent 3a6fef61
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment