Sha256: bd3fe24d7d2203e8cc108c1693acabad6180021b8b7056439c64711d8b79cfd6

Contents?: true

Size: 376 Bytes

Versions: 1

Compression:

Stored size: 376 Bytes

Contents

class FrontEndController < ApplicationController

  before_filter :load_node, only: :node

  def node
    render *@node.template_args
  end

  private

  def load_node
    @node = PushType::Node.published.find_by_path params[:permalink].split('/')
    raise ActiveRecord::RecordNotFound unless @node
    instance_variable_set "@#{ @node.type.underscore }", @node
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
push_type_core-0.1.1 app/controllers/front_end_controller.rb