use relation between cards and page models

This commit is contained in:
Manu
2019-01-13 16:30:56 -05:00
parent 238ddc2595
commit bff3a3b379

View File

@@ -9,7 +9,7 @@ class PagesController < ApplicationController
@banners = Banner.in_section('help_page').with_active
if @custom_page.present?
@cards = Widget::Card.page(@custom_page.id)
@cards = @custom_page.cards
render action: :custom_page
else
render action: params[:id]