Simplify rendering a banner
Now the banner component accepts either a banner or a section and loads the banner if it's a section, so we don't have to add the `@banners` variable in several controllers.
This commit is contained in:
@@ -6,7 +6,6 @@ class PagesController < ApplicationController
|
||||
|
||||
def show
|
||||
@custom_page = SiteCustomization::Page.published.find_by(slug: params[:id])
|
||||
@banners = Banner.in_section("help_page").with_active
|
||||
|
||||
if @custom_page.present?
|
||||
@cards = @custom_page.cards
|
||||
|
||||
Reference in New Issue
Block a user