Sha256: 0b94732f18cc3402903b5156f89b90ede5cbf8c3cc18a8283ace8638f49deb6f

Contents?: true

Size: 480 Bytes

Versions: 17

Compression:

Stored size: 480 Bytes

Contents

class <%= class_name.pluralize %>Controller < ApplicationController

  before_filter :find_page

  def index
    @<%= plural_name %> = <%= class_name %>.find(:all, :order => "position ASC")
  end

  def show
    @<%= plural_name %> = <%= class_name %>.find(:all, :order => "position ASC") # for body_content_right
    @<%= singular_name %> = <%= class_name %>.find(params[:id])
  end

protected

  def find_page
    @page = Page.find_by_link_url("/<%= plural_name %>")
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
refinerycms-0.9.5.30 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.29 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.28 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.27 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.26 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.25 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.24 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.23 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.22 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.21 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.20 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.19 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.18 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.17 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.16 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.15 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.14 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb