Sha256: c75ecb3961ecc45850bc12217d5080dbdcb6eee5472c84529c34354bc3d7cf51

Contents?: true

Size: 449 Bytes

Versions: 5

Compression:

Stored size: 449 Bytes

Contents

class SimpleContentManagement::SimplePagesController < InheritedResources::Base
	defaults :resource_class => SimpleContentManagement::SimplePage
	include SimpleAdminPanel::ControllerExtensions
	alias_method_chain :collection, :search_and_pagination
	custom_actions resource: [:refresh]

	def refresh
		refresh! do
			render "edit" and return
		end
	end

	protected
	def end_of_association_chain
		resource_class.where("name IS NULL").active
	end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
th_simple_content_management-0.2.7 app/controllers/simple_content_management/simple_pages_controller.rb
th_simple_content_management-0.2.6 app/controllers/simple_content_management/simple_pages_controller.rb
th_simple_content_management-0.2.5 app/controllers/simple_content_management/simple_pages_controller.rb
th_simple_content_management-0.2.4 app/controllers/simple_content_management/simple_pages_controller.rb
th_simple_content_management-0.2.3 app/controllers/simple_content_management/simple_pages_controller.rb