Sha256: f5538e21700d265f14f98b8f889df0018b0d855ca8a4346855282d46e10e4e91

Contents?: true

Size: 470 Bytes

Versions: 28

Compression:

Stored size: 470 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

28 entries across 28 versions & 1 rubygems

Version Path
refinerycms-0.9.5.13 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.12 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.11 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.10 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.9 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.8 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.7 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.6 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.5 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.4 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.3 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.2 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5.1 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.5 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.4.5 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.4.4 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.4.3 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.4.2 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.4.1 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb
refinerycms-0.9.4 vendor/plugins/refinery/lib/generators/refinery/templates/public_controller.rb