Sha256: ec1536a6b8d3cf54e4a98c30f688ce71085838491a1ce7f320ab4808839eb10f

Contents?: true

Size: 277 Bytes

Versions: 7

Compression:

Stored size: 277 Bytes

Contents

# A Kaminari patch for scoping the urls.
Kaminari::Helpers::Tag.class_eval do

	def page_url_for(page)
		params = @params.merge(@param_name => (page <= 1 ? nil : page))
		if @options[:scope]
			@options[:scope].url_for params
		else
			@template.url_for params
		end
	end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
alchemy_cms-2.1.12 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.1.11 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.1.9.1 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.1.9 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.1.8.1 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.1.8 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.1.7 lib/alchemy/scoped_pagination_url_helper.rb