Sha256: 0abf1f20924d6cd00a8f3fcdd7522133ee01c2ef5e6c96b1a7dc86697e679db1

Contents?: true

Size: 293 Bytes

Versions: 81

Compression:

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

81 entries across 81 versions & 2 rubygems

Version Path
alchemy_cms-2.4.rc2 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.4.rc1 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.3.1 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.4.beta2 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.3.2 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.3.1 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.3.0 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.3.rc5 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.2 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.1 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.0 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.rc15 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.rc14 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.rc13 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.rc11 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.rc8 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.rc7 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.rc6 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.rc3 lib/alchemy/scoped_pagination_url_helper.rb
alchemy_cms-2.2.rc2 lib/alchemy/scoped_pagination_url_helper.rb