fix will paginate renderer
This commit is contained in:
parent
39ee27acf0
commit
d626148a83
1 changed files with 5 additions and 1 deletions
|
|
@ -5,7 +5,11 @@ require 'will_paginate/array'
|
|||
|
||||
module WillPaginate
|
||||
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
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue