Sha256: e96eec9a766189100df66cd0ea4b60011d8ed19fc36f3c30dbe4b57b9684c8bf

Contents?: true

Size: 563 Bytes

Versions: 6

Compression:

Stored size: 563 Bytes

Contents

class PagesController < ApplicationController
  include Beef::Pages::HelperMethods

  def show
    @page = Page.published.find_by_permalink(params[:id])
    
    @page_title = @page.title
    @page_description = @page.description
    @page_keywords = @page.tag_list
    
    render :template => "pages/templates/#{(@page.template || get_template_names.first)}"
  end
  
  def preview
    @page = Page.new(session[:page_preview])
    session[:page_preview] = nil
    render :template => "pages/templates/#{(@page.template || get_template_names.first)}"
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
beef-pages-0.1.5 app/controllers/pages_controller.rb
beef-pages-0.1.6 app/controllers/pages_controller.rb
beef-pages-0.1.7 app/controllers/pages_controller.rb
beef-pages-0.2.0 app/controllers/pages_controller.rb
beef-pages-0.2.2 app/controllers/pages_controller.rb
beef-pages-0.2.3 app/controllers/pages_controller.rb