Skip to content

add_limit! isn't being passed all options #111

Closed
wants to merge 1 commit into from
View
2 lib/will_paginate/finder.rb
@@ -133,7 +133,7 @@ def paginate_by_sql(sql, options)
query = sanitize_sql(sql.dup)
original_query = query.dup
# add limit, offset
- add_limit! query, :offset => pager.offset, :limit => pager.per_page
+ add_limit! query, options.merge(:offset => pager.offset, :limit => pager.per_page)
# perfom the find
pager.replace find_by_sql(query)
Something went wrong with that request. Please try again.