Sha256: 9e895038939efaab5287c83fc0f02e269e736f98b3e67af1eac1f074a874aafc

Contents?: true

Size: 297 Bytes

Versions: 8

Compression:

Stored size: 297 Bytes

Contents

class PagesController < ApplicationController

  def show
    @page = Page.find params[:id]
    if @page.nil?
      redirect_to root_path
      return
    end
    render params[:id].underscore if lookup_context.template_exists?(params[:id].underscore, "pages", false)
  end

  def index

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tmatt_cms-0.1.9 lib/generators/tmatt_cms/templates/controllers/pages_controller.rb
tmatt_cms-0.1.8 lib/generators/tmatt_cms/templates/controllers/pages_controller.rb
tmatt_cms-0.1.7 lib/generators/tmatt_cms/templates/controllers/pages_controller.rb
tmatt_cms-0.1.6 lib/generators/tmatt_cms/templates/controllers/pages_controller.rb
tmatt_cms-0.1.5 lib/generators/tmatt_cms/templates/controllers/pages_controller.rb
tmatt_cms-0.1.4 lib/generators/tmatt_cms/templates/controllers/pages_controller.rb
tmatt_cms-0.1.3 lib/generators/tmatt_cms/templates/controllers/pages_controller.rb
tmatt_cms-0.1.2 lib/generators/tmatt_cms/templates/controllers/pages_controller.rb