Merge pull request #3019 from diasp/fix-renderer
fix will paginate renderer
This commit is contained in:
commit
35cef7727f
1 changed files with 5 additions and 1 deletions
|
|
@ -5,7 +5,11 @@ require 'will_paginate/array'
|
||||||
|
|
||||||
module WillPaginate
|
module WillPaginate
|
||||||
module ActionView
|
module ActionView
|
||||||
def will_paginate(collection = nil, options = { :renderer => WillPaginate::ActionView::LinkRenderer } )
|
def will_paginate(collection = nil, options = {} )
|
||||||
|
options, collection = collection, nil if collection.is_a? Hash
|
||||||
|
# Taken from original will_paginate code to handle if the helper is not passed a collection object.
|
||||||
|
collection ||= infer_collection_from_controller
|
||||||
|
options[:renderer] ||= WillPaginate::ActionView::LinkRenderer
|
||||||
super.try :html_safe
|
super.try :html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue