Sha256: 08a37a4d1d5078c3460b34c8ab2029a31ca08306d89ea8b72a95d1c09d30b973

Contents?: true

Size: 940 Bytes

Versions: 9

Compression:

Stored size: 940 Bytes

Contents

class Guide::NodesController < Guide::BaseController
  def show
    expose_layout
    expose_navigation
    expose_node
  end

  private

  def expose_layout
    @layout_view = Guide::LayoutView.new(
      bouncer: bouncer,
      diplomat: diplomat,
      content_node: content,
      active_node: active_node,
      active_node_heritage: nobilizer.bestow_heritage(node_path),
      active_node_visibility: active_node_visibility,
      active_node_title: nobilizer.bestow_title(node_path),
      authentication_system: injected_authentication_system,
      injected_html: injected_html,
    )
  end

  def expose_navigation
    @navigation_view = Guide::NavigationView.new(
      bouncer: bouncer,
      node: content,
      active_node: active_node,
    )
  end

  def expose_node
    @node_view = Guide::NodeView.new(
      node: active_node,
      bouncer: bouncer,
      diplomat: diplomat,
      node_path: node_path,
    )
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
guide-0.8.0 app/controllers/guide/nodes_controller.rb
guide-0.7.0 app/controllers/guide/nodes_controller.rb
guide-0.6.1 app/controllers/guide/nodes_controller.rb
guide-0.6.0 app/controllers/guide/nodes_controller.rb
guide-0.5.0 app/controllers/guide/nodes_controller.rb
guide-0.4.1 app/controllers/guide/nodes_controller.rb
guide-0.4.0 app/controllers/guide/nodes_controller.rb
guide-0.3.2 app/controllers/guide/nodes_controller.rb
guide-0.3.1 app/controllers/guide/nodes_controller.rb