Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: reperezz/will_paginate
base: master
head fork: mislav/will_paginate
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
This comparison is big! We're only showing the most recent 250 commits
Commits on Oct 12, 2008
@mislav mislav BACKWARDS INCOMPATIBLE: revamp LinkRenderer, greatly reducing its dep…
…endency on ActionView and making it easier to modify by subclassing
@mislav mislav fix a spec relying on global options aacfbca
@mislav mislav nicer memoized #html_attributes accessor 5a0a11c
@mislav mislav markup changes: <span class="current">1</span> is now <em>1</em>. als…
…o, "a.prev_page" is now "a.previous_page" (for consistency)
@mislav mislav html_attributes -> container_attributes. add html_container method th…
…at wraps pagination links in a div
@mislav mislav break the #url method into smaller methods and make some optimization…
… by caching base params
@pietern pietern The page_entries_info helper can now be called without any arguments …
…just as the will_paginate helper
@mislav mislav stop supporting WillPaginate::Collection#page_count legacy method 1c625fc
@mislav mislav stringified_merge -> symbolized_update. work with symbol keys instead…
… of strings
@mislav mislav first version that works with Merb -> add a Merb inclusion hook ba7096b
Commits on Oct 26, 2008
@mislav mislav Rails 2.2 fix: stop using `extract_attribute_names_from_match` inerna…
…l AR method, it no longer exists
@mislav mislav fix wrong filename in gemspec 3d58c05
Commits on Nov 09, 2008
@mattetti mattetti added DM specs and loaded dm or ar finders based on Merb's orm in use. 5e165ef
@mattetti mattetti w00t added real/full Merb support 16d2762
@mislav mislav split ActionView/Merb concerns better 4906f79
@mislav mislav rats, Merb url(:this) doesn't include GET params? reverting. also, do…
…n't document :base_url just yet
Commits on Nov 10, 2008
@mislav mislav Merb views: go back to using url(:this), but preserve other params ex…
Commits on Nov 23, 2008
@mislav mislav update gemspec and manifest with Merb files 7fda301
Commits on Nov 24, 2008
@mislav mislav Tag will_paginate 3.0.0. This is still in a separate branch. Will rel…
…ease soon
@mislav mislav explicitly define that I want to use the 'sqlite3-ruby' gem.
I have no idea why a simple require 'sqlite3' doesn't work anymore
@mislav mislav paginated_section: use new concat style in ActionPack 2.2 to avoid de…
…precation warnings
@mislav mislav refactor windowed_page_numbers for speed. this kinda reverts 3c594b. …
…[Lida Tang]
Commits on Dec 03, 2008
@mislav mislav use object introspection rather than version checks to see when the #…
…concat deprecation occured in ActionView
Commits on Dec 21, 2008
@mislav mislav website -> gh-pages folder cb150bb
@mislav mislav use string key for 'page' parameter when constructing URLs in Merb [p…

[#256 state:resolved]
Commits on Jan 08, 2009
@mislav mislav Add Sequel support.
Extended Sequel::Dataset::Pagination to walk and talk like WillPaginate::Collection
@mislav mislav delete stuff in examples/ as they're now GitHub Pages (gh-pages branch) 74e4355
@mislav mislav update manifest. fix "rake manifest" to ignore the submodule 6aa1111
Commits on Jan 11, 2009
@mislav mislav move a spec that requires the database under the group that is skippe…
…d if the connection could not be established
@mislav mislav ruby 1.9 -- explicitly require 'active_support/multibyte' and 'active…
…_support/rescuable' in specs
@mislav mislav use dchelimsky-rspec ~> 1.1.11 gem c0a37ed
@mislav mislav split spec runner tasks into rake spec (framework-agnostic), spec:rai…
…ls, spec:datamapper and spec:sequel
Commits on Jan 12, 2009
@mislav mislav refactored LinkRenderer#symbolized_update not to have a return statem…
…ent in the iterator
@mislav mislav Total rdoc love. Point out that this is framework-agnostic now 231f964
Commits on Jan 16, 2009
@mislav mislav move "The importance of SQL's ORDER BY" doc section to WillPaginate::…
Commits on Feb 10, 2009
@mislav mislav simplify manifest generation code by using `git ls-files`
this is a cherry-pick of b9eef89
Commits on Mar 11, 2009
@mislav mislav previous/next links now use the left/right arrow characters (→) inste…
…ad of angle quotes (»)
Commits on Mar 26, 2009
@mislav mislav fix grammar in credits c46911d
Commits on May 09, 2009
@flyingmachine flyingmachine Merb: enable usage of :param_name 6056ab0
Commits on May 20, 2009
@mislav mislav remove dependency to a specific version of rspec (only causes trouble) f7bd386
@mislav mislav check for method existance in a ruby 1.8- and 1.9-compatible way ed6785b
@mislav mislav Sequel 3.0: explicitly require 'sequel/extensions/pagination' 23e37cc
@kamal kamal Rails 2.3 compat: query parameter parsing with Rack e0b094f
Commits on Nov 06, 2009
@mislav mislav cleanup loading in Rakefile d882efc
Commits on Nov 07, 2009
@mislav mislav change WillPaginate::VERSION to "3.0.pre"; cleanup gemspec 77bfb07
@mislav mislav delete .manifest file, crazy .autotest monkeypatches 5b43ca9
@mislav mislav Rails 3: `add_limit!` method is gone; add SQL limit/offset manually 14133bd
@mislav mislav use `tap` instead of `returning` d8befd1
@mislav mislav specs: don't require rubygems; no need to explicitly add "lib" to loa…
…d path
@mislav mislav view specs: instantiate a new ActionView::Base on every `render` call
In Rails 3, changing `view.assigns` hash doesn't mean they'll be applied
as instance variables to the view object.
@mislav mislav change spec expectation: ArgumentError is wrapped in a ActionView::Te…
@mislav mislav Rails 3: html-scanner load hackery not needed anymore 6f97217
@mislav mislav Rails 3: SelectorAssertions are now in ActionDispatch 9e26253
@mislav mislav Rails 3: mark `will_paginate`, `page_entries_info` output HTML safe 34749e0
Commits on Nov 10, 2009
@mislav mislav Rails 3: fix rendering in view specs by declaring available controlle…
…r names
Commits on Feb 04, 2010
@mislav mislav Rails 3 changed to `html_safe` instead of `html_safe!` 8008fc9
@mislav mislav require 'will_paginate/core_ext' in sequel adapter fec98b3
@dhh dhh ActiveRecord::Calculations::CALCULATIONS_OPTIONS is gone from Rails 3 7510b28
@lifo lifo scope(:select) is gone from ActiveRecord 3; document a workaround 01f04f3
@mislav mislav use Bundler to bootstrap testing dependencies bfbdc5b
@mislav mislav ActiveRecord 3: `named_scope` to `scope`. get rid of the NamedScope b…
…ackport and `WillPaginate.enable`
@mislav mislav tweak the ActiveRecord test connector bbbf1d2
@mislav mislav mix in pagination in ActiveRecord::Relation 508b76c
@mislav mislav can't use `references_eager_loaded_tables?` that way in ActiveRecord 3 b35b46e
@mislav mislav revamp ActiveRecord specs; uses less mocking 1f1edcd
@mislav mislav stop supporting dynamic finder syntax (`paginate_by_foo`) 67f246a
Commits on Feb 05, 2010
@mislav mislav cleanup Rails bootstrapping and move it to a Railtie 0c35f28
@mislav mislav pre-release v3.0.pre for Rails 3 37b5bfa
@mislav mislav fix busted mixing in ActiveRecord aca3794
@mislav mislav don't use deprecated RAILS_ENV 66b76df
Commits on Mar 28, 2010
@mislav mislav Rails 3.0.0.beta1: use new router in specs cd5a7c8
@mislav mislav update `paginated_section` to be "<%= %>" style block helper
Otherwise we'd get this deprecation warning:
"<% %> style block helpers are deprecated. Please use <%= %>"
Commits on Apr 16, 2010
@mislav mislav fix view specs with Rails 3.0.0.beta3 b0afb8c
@mislav mislav ":requirements" hash in routes is now called ":constraints" 08cf6ec
Commits on Apr 18, 2010
@mislav mislav don't use `railtie_name` 206917d
@mislav mislav use public clone URL for "website" submodule
closes #42
Commits on Apr 19, 2010
@mislav mislav use File.expand_path to require "will_paginate/version" in gemspec ec33678
Commits on Apr 24, 2010
@mislav mislav added "encoding: utf-8" to gemspec to appease Ruby 1.9
closes #44
Commits on Jul 27, 2010
@mislav mislav fix spec suite to work with Rails 3.0.0.rc bbf71b7
@mislav mislav bump to v3.0.pre2: Rails 3.0.0.rc compatibility 93e7b44
@mislav mislav don't require git on the system for the gemspec fccbb0b
Commits on Aug 09, 2010
@mislav mislav bundle: put mysql, pg and ruby-debug in groups
Useful so bundle can be installed without those gems, which are all optional
@mislav mislav fix `spec/console` and show nice SQL output dfc3044
@mislav mislav ActiverecordTestConnector shouldn't be a class 3615938
Commits on Oct 11, 2010
@matthuhiggins matthuhiggins Use autoloading in Railtie so that framework loading isn't triggered …
…by will_paginate
Commits on Oct 12, 2010
@mislav mislav bump the bundle to Rails 3.0.0 final b6e4e28
@mislav mislav run spec/console with `bundle exec` 22fe383
@mislav mislav paginate_by_sql: avoid table alias on Oracle
Cherry-pick of 2bd01d0
@mislav mislav bump to 3.0.pre3 f185250
@mislav mislav update installation instructions in readme b1a5bee
Commits on Jul 26, 2011
@mislav mislav Rails 3.1, RSpec 2 compatibility f703f88
@mislav mislav skip Sequel/DataMapper specs if they can't be loaded 7c6c802
@mislav mislav spec/console: silence PRAGMA queries 352ad1b
@mislav mislav add spec helper to list queries executed during the block dc79d43
@mislav mislav update DataMapper f4f2d41
@mislav mislav use `method_defined?` in core_ext 4478175
@mislav mislav completely refactor Active Record pagination using Relations
also adds the new `page()` method
@mislav mislav simplify railtie; remove unnecessary requires 87d0dba
@mislav mislav stop requiring collection.previous/next_page methods in views a9b8f07
@mislav mislav fix paginated_section helper when no pagination is shown 0b9df8e
@mislav mislav v3.0.pre4 a1f3971
Commits on Jul 27, 2011
@fabioyamate fabioyamate add spec for paginated_section for a single page
Fixes #90
Commits on Jul 28, 2011
@mislav mislav global configurable limit: `WillPaginate.per_page = 30` 95a03d8
@mislav mislav DataMapper pagination rewritten from the ground up 4ced819
@mislav mislav Sequel is back fb36491
@mislav mislav move Active Record pagination outside of the "Finders" namespace dfd206b
@mislav mislav goodbye for now, Active Resource pagination 05a8dfc
@mislav mislav trash the now unnecessary "Finders" namespace 1fc2f10
@mislav mislav setup continuous integration testing with Travis-CI 015d53a
@mislav mislav removed deprecated fields from the gemspec e434738
@mislav mislav try to fix travis build db32fcf
@mislav mislav have no fear, i18n is here!
:previous_label, :next_label, page gap text and the `page_entries_info`
method output can now all be translated by overriding values seen in
"lib/will_paginate/locale/en.yml" from your own application locale files.

closes #99, #10, #109
@mislav mislav remove travis branch restriction a2648e7
@mislav mislav Merge branch 'rails3'
will_paginate is no longer compatible with Rails versions older than 3.0,
so throw the old garbage out
@mislav mislav remove 'website' submodule 5965018
@mislav mislav ignore more unimportant mysql and postgres queries be93bc1
@mislav mislav new Readme ae6f5fc
@mislav mislav fix spec/console 2487eb1
@mislav mislav AR default_timezone = :utc 2a4fdfd
@mislav mislav bring back "current" classname to current page
Listening to @kneath in 8c585a7
Commits on Aug 02, 2011
@mislav mislav Active Record: enable overriding :total_entries value to avoid a coun…
…t query

fixes #143
@mislav mislav proper Merb integration 095dbb0
@mislav mislav Sinatra has taken the stage e8205b5
@mislav mislav refactor page number checking, add offset validation
Raise WP::InvalidPage exception on offset values larger than SQL's BIGINT

references #115
@mislav mislav note about Sequel 033f9e7
@mislav mislav Travis CI: don't try to test mysql2 adapter on Rails 3.0 16636f5
Commits on Aug 03, 2011
@mislav mislav fix paginated Relation `count` & `empty?` methods
closes #145
@mislav mislav remember custom :count options in sub-relations 530ff2f
@mislav mislav enable ruby-debug in specs b4a9b80
Commits on Aug 04, 2011
@mislav mislav enable will_paginate to load as a plugin 005b871
@mislav mislav try to fix I18n autoload issue on Travis 3a246ba
@mislav mislav enable use of Sequel datasets with `page_entries_info` helper 3a3e07c
Commits on Aug 05, 2011
@mislav mislav mix in Active Record/Action View directly on `require`
Get rid of extra steps, they were a bad idea
@mislav mislav improve specs for Active Record count with :include 339e217
@mislav mislav require core_ext for Merb a82b59e
@mislav mislav refactor i18n and `page_entries_info` helper 52056ee
@mislav mislav i18n: fix model_name fallback for Rails fbb6f6b
@mislav mislav ensure will_paginate translations can be overriden by those of Rails app
Fixes Rails plugin mode
Commits on Aug 06, 2011
@mislav mislav extract translate helpers into WillPaginate::I18n module 9d200f9
@mislav mislav trash the bloated Deprecation module that's currently unused 6e67dcd
@mislav mislav update docs in the Readme d0474fa
@mislav mislav ultra simple installation instructions 9ede214
Commits on Aug 07, 2011
@mislav mislav represent the concept of page number with the PageNumber class
It handles validation of numbers and calculating the offset value.
Commits on Aug 09, 2011
@mislav mislav minor i18n fixes c3ebc51
@useruby useruby Fixed spec file, changed README.rdoc to f3f9df0
@mislav mislav Active Record: fix `total_entries` on grouped relations 87f827d
@mislav mislav error out if installed on Rails < 3.0 f4b6e3b
@mislav mislav the big v3.0 c7768f5
@plentz plentz update Gemfile install instructions
[ci skip]
Commits on Aug 10, 2011
@mislav mislav improve cross-platform git check in gemspec
[ci skip]
@mislav mislav tweak will_paginate Rails helper so it can be used in custom context b385f38
Commits on Aug 11, 2011
@mislav mislav fix handling WillPaginate::InvalidPage exceptions in Rails
They are automatically rescued as 404 in production.

fixes #152 [ci skip]
Commits on Aug 23, 2011
@mislav mislav enable access to ViewHelpers.pagination_options for Rails initializers
closes #165
Commits on Aug 31, 2011
@mislav mislav test against Rails 3.0.10 & 3.1.0 e1f4af7
Commits on Sep 08, 2011
@phene phene Active Record: fix empty? on a relation with a group clause
Fixes #161, fixes #167
Commits on Sep 15, 2011
@mislav mislav remove :renderer from global pagination_options to discourage using it
Because lately it's popular to mount different web frameworks in the
same Ruby process (e.g. Sinatra apps beside Rails), a global link
renderer option is useless since it would affect all frameworks but it's
hardly possible that a single renderer will work in all of these

See resolution for #176
Commits on Sep 17, 2011
@mislav mislav deprecate renderer, previous/next_label global settings with paginati…

Renderer shouldn't be set globally because of mounted apps
compatibility, and previous/next_label in Rails should be customized
with i18n rather than editing pagination_options.
@mislav mislav remove pending spec which purpose I forgot 93d23e9
@mislav mislav Active Record 3.0: preserve pagination after `scoped` call
AR 3.1 is not affected.

Fixes #175
@mislav mislav ignore a couple of AR 3.0 deprecation warnings in test suite d99caaa
@mislav mislav fix `total_pages`, `out_of_bounds?` for empty collections
Fixes #169
@mislav mislav fix deprecation block arity for ruby 1.8.7 64e2d77
@mislav mislav v3.0.1 bugfix release
[ci skip]
Commits on Sep 27, 2011
@mislav mislav update Rails to 3.1.1, bump Sequel 4a51ca4
@mislav mislav Active Record: fix `paginate_by_sql(:page => nil)`
Closes #187
@mislav mislav Active Record: fix `size` method for grouped relations 465eda2
Daniel Teixeira Active Record: fix stripping ORDER clause in paginate_by_sql
Closes #120
Dave Smylie Active Record: fix paginate_by_sql for Oracle c0e61aa
@mislav mislav release v3.0.2 with Active Record fixes
[ci skip]
Commits on Dec 20, 2011
@mislav mislav test against Rails 3.2.0.rc1 f23551e
@mislav mislav fix handling InvalidPage exceptions in Rails 3.2 6f4390b
Commits on Jan 31, 2012
@mislav mislav fix the ExceptionWrapper patch
Closes #215
@mislav mislav test against Rails 3.2.1 01dd16c
@pnomolos pnomolos Data Mapper: fix stack overflow 0bb3c8d
@mislav mislav Data Mapper: fix to_a and association bug
Closes #197, #218, #216, #204
@mislav mislav provide SQL order in tests b41efc1
@mislav mislav v3.0.3 71f793e
Commits on Nov 06, 2012
@mislav mislav fix Active Record choking on a core ext from Sequel cc35637
Commits on Nov 23, 2012
@mislav mislav test with Rails v3.2.9 a16974d
@mislav mislav enable CI for edge Rails 72b0f13
@mislav mislav Rails 4 test compatibility 738b27b
@mislav mislav use `all` instead of deprecated `scoped` in AR 4 70a332e
@mislav mislav don't test Rails 4 on Ruby 1.8 0223095
@mislav mislav fix tests on Ruby 1.8 7f723b5
@mislav mislav fix Rails 4 feature detection 071b3e4
@mislav mislav fix Postgres failure due to unordered query fbf802a
Commits on Jan 10, 2013
@mislav mislav use `total_entries` in page_entries_info() consistently
Fixes #278, fixes #284, fixes #207
@marcgg marcgg Removed duplicate doc entry for page_links 857bcca
@bryanlarsen bryanlarsen failsafe response: don't mess with privacy of `status_code'
This error:

  Error during failsafe response: private method `status_code'
  called for ActionDispatch::ExceptionWrapper

is dumped to the log whenever a backtrace is dumped to the log for an
app that uses will_paginate along with a Rails 3.2 and Hobo 1.4.
@l-schirrmeister l-schirrmeister have LinkRenderer use `total_pages` from LinkRendererBase 25582e5
@mislav mislav fix `first` for paginated AR Relations
Fixes #223
@mislav mislav bump Rails 2779c47
@mislav mislav bump Rails versions f30a541
@mislav mislav fix `last` for paginated AR 3.0 Relation d5d117a
@mislav mislav CI on Ruby 1.9.3 too da50e98
@mislav mislav release v3.0.4 a6caca5
Commits on Feb 06, 2013
@dbackeus dbackeus add Mongoid support ee44ac3
@mislav mislav enable Mongo on Travis 6fcbe84
@mislav mislav skip Mongoid specs if not present in the bundle a777bc8
@mislav mislav don't re-test Sequel and DataMapper support across Rails versions
Since these integrations have nothing to do with Rails, it's enough for
just the main Gemfile to include the libraries.
@mislav mislav use "debugger" gem on 1.9 0478099
@mislav mislav replace Rake + ruby CI runner with one in bash 6e6cca4
@mislav mislav add `each-gemfile` script 61c9f49
Commits on May 22, 2013
@tiegz tiegz fix Data Mapper test assertion fda731d
Commits on Jun 21, 2013
@mislav mislav test against Rails 4.0.0.rc2 and Rails 4.1 (edge) 4289490
@pawelpacana pawelpacana Exclude reorder for count queries.
It turns out reorder behaves differently on Rails 3.1 and requires
explicit exclude to not pollute count query with order clause.
@mislav mislav Rails 4 compat: AR::Base.silence requires an argument c5abe4d
@mislav mislav Rails 4 compat: port named scopes to new syntax
Subtle edge case bugs pop up in AR 4 when named scopes are declared with
the old syntax. This is likely a bug with AR, but work around it for now.
@mislav mislav don't build Rails 4 against Ruby 1.8, 1.9.2 7a45eab
Commits on Jul 08, 2013
@jordimassaguerpla jordimassaguerpla add license information to gemspec
[ci skip]
Commits on Sep 16, 2013
@mislav mislav always call `html_safe` on will_paginate result
This ensures that the HTML output of `will_paginate` view helper is not
only marked safe in Rails, but in Padrino as well.
Commits on Sep 23, 2013
@chandresh chandresh clarify that the library works with Rails 4 as well
[ci skip]
Commits on Feb 05, 2014
@phuesler phuesler Support paginate(:total_entries => n) for dm d14eccc
Commits on Feb 06, 2014
@mislav mislav Merge pull request #358 from phuesler/dm_total_entries
Support paginate(:total_entries => n) for DataMapper
Commits on Jun 17, 2014
@mislav mislav cleaner backtrace in specs 5d95c14
@mislav mislav add test that page query param will be overriden 03c19d7
@mislav mislav prevent tampering with host, port, protocol
Prevents :host, :port, :protocol settings get inherited from GET query

Fixes #285
@mislav mislav Fix `script/test_all` to exit with nonzero status on failures
Fixes #387
@mislav mislav Ruby 2.1.1 compat for tests f5bc97f
@mislav mislav Bump Rails in tests to 4.0.5 27382c2
@mislav mislav Ignore `SHOW FULL FIELDS` in tests 2b9d769
@mislav mislav Test with Ruby 2.1.2 but not with 1.9.2 23a86b5
@mislav mislav Bump edge Rails to 4.2.0.alpha 388836c
@mislav mislav Active Record 4 compat in tests 3868ee2
@mislav mislav Action View 4 compat in tests ab7200e
@nathany nathany Test against Rails 4.1
`BUNDLE_GEMFILE=Gemfile.rails4.1 bundle exec rspec spec`
@nathany nathany Rails 4.1: remove unnecessary scoped in test bf64e58
@nathany nathany Rails 4.1: deprecated_finders for apply_finder_options 4046c5e
Commits on Jun 18, 2014
@mislav mislav Test with Rails 4.0.5
Closes #332
@mislav mislav Add explicit `references()` directive in tests for Rails 4.1 compat
Rails 4.1 no longer scans the SQL conditions string to detect referenced
tables. To fix existing tests, manually specify the referenced tables.
@mislav mislav Rails 4.1 compat for association that had `:includes`
The directive on the association no longer seems to have any effect.
@mislav mislav Fix `with_scope` test for Rails 4.1 5aca259
@DanielVartanov DanielVartanov Accept arguments for Relation#count 5a914f3
@mislav mislav Forward `count` arguments on Relation for Rails 4.1 compat
Fixes #382, closes #303
@mislav mislav Bump mysql2 gem in edge Rails 2202bbc
@mislav mislav Use "activerecord-mysql2-adapter" in Rails 3.0 tests 79953ec
@mislav mislav `ActiveRecord::Base.silence` is deprecated 60a3105
@mislav mislav Passing string to `establish_connection` is deprecated cb6c537
@mislav mislav Silence useless minitest warnings
Minitest thinks we're going to use it as a testing frameworks and
complains very loudly that we should require `minitest/autorun` instead.
@mislav mislav Merge branch 'rails4'
Closes #388
@poporul poporul Extract spec matchers into separate files f2de0a9
@poporul poporul Remove duplicate method c9029bf
@mislav mislav Oops, this is a duplication of the main Gemfile bf331ce
@edariedl edariedl Fix count method to work with select statement. aa5db3f
@edariedl edariedl Add test for pagination with select statement. 2c92c69
Commits on Jun 19, 2014
@mislav mislav Merge pull request #372 from edariedl/fix_count_with_select_statement
Fix count method to work with select statement.
Commits on Jun 27, 2014
@dnrce dnrce Test against Rails 4.1.2 4139153
@mislav mislav Merge pull request #394 from zoombody/rails-4.1.2
Test against Rails 4.1.2
Commits on Nov 17, 2014
@mislav mislav Boxen compatibility for database.yml
My local databases are managed by Boxen and set up differently than the
default configuration from database.yml
@mislav mislav Clarify Rails 3+ compatibility and suggest locking to 3.0.x 74a6cd0