Sha256: 102fc21023abcddf6502582f7ce92b8edfd5ae57f79665f3c00838eb216bda6e
Contents?: true
Size: 992 Bytes
Versions: 13
Compression:
Stored size: 992 Bytes
Contents
module QuicCms class PagesController < ApplicationController def show if params[:permalink] @page = Page.find_by_permalink(params[:permalink]) if @page.nil? @page = Page.new(:title => "Page with permalink of #{params[:permalink]} does not exist", :content => "If you are an Admin Please <a href='/users/sign_in'> Log in </a>and create it", :permalink => params[:permalink], @show_title => true) end else @page = Page.find(params[:id]) end end def index @page = Page.find_by_permalink("home") if @page.nil? @page = Page.new(:title => "Page with permalink of #{params[:permalink]} does not exist", :content => "If you are an Admin Please <a href='/users/sign_in'> Log in </a>and create it", :permalink => params[:permalink], @show_title => true) end render 'show' end end end
Version data entries
13 entries across 13 versions & 1 rubygems