@@ -171,18 +171,17 @@ def render_pagination(collection, content_type, options={})
171171 if collection . blank?
172172 content_tag ( :div , "No Content" , :class => "pagination" )
173173 else
174- model_class = content_type . instance_of? ( Class ) ? content_type : content_type . model_class
175174 render :partial => "pagination" , :locals => {
176175 :collection => collection ,
177- :first_page_path => polymorphic_path ( engine_aware_path ( model_class ) , { :page => 1 } . merge ( options ) ) ,
178- :previous_page_path => polymorphic_path ( engine_aware_path ( model_class ) , { :page => collection . previous_page ? collection . previous_page : 1 } . merge ( options ) ) ,
179- :current_page_path => polymorphic_path ( engine_aware_path ( model_class ) , options ) ,
180- :next_page_path => polymorphic_path ( engine_aware_path ( model_class ) , { :page => collection . next_page ? collection . next_page : collection . current_page } . merge ( options ) ) ,
181- :last_page_path => polymorphic_path ( engine_aware_path ( model_class ) , { :page => collection . total_pages } . merge ( options ) )
176+ :first_page_path => url_for ( { :page => 1 } . merge ( options ) ) ,
177+ :previous_page_path => url_for ( { :page => collection . previous_page ? collection . previous_page : 1 } . merge ( options ) ) ,
178+ :current_page_path => url_for ( options ) ,
179+ :next_page_path => url_for ( { :page => collection . next_page ? collection . next_page : collection . current_page } . merge ( options ) ) ,
180+ :last_page_path => url_for ( { :page => collection . total_pages } . merge ( options ) )
182181 }
183182 end
184183 end
185-
184+
186185 def url_with_mode ( url , mode )
187186 url = "" unless url # Handles cases where request.referrer is nil (see cms/_page_toolbar.html.erb for an example)
188187 uri = URI . parse ( url )
0 commit comments