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-3.2.1 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.1.3 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
lc_alchemy_cms-3.2.1 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
lc_alchemy_cms-3.2.0 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.2.0 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.2.0.rc1 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.2.0.beta lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-2.9.1 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.1.1 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.0.4 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.1.0 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.1.0.rc3 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.1.0.rc2 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.1.0.rc1 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.1.0.beta6 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.1.0.beta5 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.1.0.beta4 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.0.3 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.1.0.beta3 lib/alchemy/kaminari/scoped_pagination_url_helper.rb
alchemy_cms-3.1.0.beta2 lib/alchemy/kaminari/scoped_pagination_url_helper.rb