Class: Tasks::Content::PreviewController

Inherits:
ApplicationController
  • Object
show all
Includes:
TaskControllerConfiguration
Defined in:
app/controllers/tasks/content/preview_controller.rb

Instance Method Summary collapse

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

#otu_contentObject



4
5
6
# File 'app/controllers/tasks/content/preview_controller.rb', line 4

def otu_content
  @otu = Otu.find(params[:otu_id])
end

#otu_content_for_layoutObject



8
9
10
11
12
13
# File 'app/controllers/tasks/content/preview_controller.rb', line 8

def otu_content_for_layout
  @otu = Otu.find(params[:otu_id])
  @otu_page_layout = OtuPageLayout.find(params[:otu_page_layout_id])
  @contents = @otu.contents.for_page_layout(@otu_page_layout.id)
  render 'contents/preview'
end