Sha256: cd0b135bd3e7f72ed193d9ab58c59f64a12db7910360d21a2caa2b953ed33dda

Contents?: true

Size: 675 Bytes

Versions: 11

Compression:

Stored size: 675 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])
    @page.id = 0
    @page.published_at = Time.now
    @page.created_by = current_user if @page.created_by.nil?
    session[:page_preview] = nil
    render :template => "pages/templates/#{(@page.template || get_template_names.first)}"
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
beef-pages-0.3.4 app/controllers/pages_controller.rb
beef-pages-0.3.5 app/controllers/pages_controller.rb
beef-pages-0.3.14 app/controllers/pages_controller.rb
beef-pages-0.3.13 app/controllers/pages_controller.rb
beef-pages-0.3.12 app/controllers/pages_controller.rb
beef-pages-0.3.11 app/controllers/pages_controller.rb
beef-pages-0.3.10 app/controllers/pages_controller.rb
beef-pages-0.3.9 app/controllers/pages_controller.rb
beef-pages-0.3.8 app/controllers/pages_controller.rb
beef-pages-0.3.7 app/controllers/pages_controller.rb
beef-pages-0.3.6 app/controllers/pages_controller.rb