Class: Tramway::Page::PreviewsController
- Inherits:
-
ApplicationController
- Object
- Core::ApplicationController
- ApplicationController
- Tramway::Page::PreviewsController
- Includes:
- AuthManagement
- Defined in:
- app/controllers/tramway/page/previews_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/tramway/page/previews_controller.rb', line 9 def show @page = ::Tramway::Page::Page.find params[:id] @blocks = @page.blocks.active.map do |block| if block.block_type.header_with_form? && block.form_url.present? # FIXME: in future @header_with_form = block.form_to_render.new(Tramway::Auth.authenticable_models.first.new, page: @page.id) end ::Tramway::Landing::BlockDecorator.decorate block end end |