Ticket #9112: deprecated_notice_about_paginate_in_README_patch.diff
| File deprecated_notice_about_paginate_in_README_patch.diff, 2.2 kB (added by avocade, 1 year ago) |
|---|
-
actionpack/lib/action_controller/scaffolding.rb
old new 106 106 107 107 108 108 def list#{suffix} 109 @#{ singular_name}_pages, @#{plural_name} = paginate :#{plural_name}, :per_page => 10109 @#{plural_name} = #{class_name}.find(:all) 110 110 render#{suffix}_scaffold "list#{suffix}" 111 111 end 112 112 -
actionpack/lib/action_controller/templates/scaffolds/list.erb
old new 19 19 <% end %> 20 20 </table> 21 21 22 <%= link_to "Previous page", { :page => instance_variable_get("@#{@scaffold_singular_name}_pages").current.previous } if instance_variable_get("@#{@scaffold_singular_name}_pages").current.previous %>23 <%= link_to "Next page", { :page => instance_variable_get("@#{@scaffold_singular_name}_pages").current.next } if instance_variable_get("@#{@scaffold_singular_name}_pages").current.next %>24 25 22 <br /> 26 23 27 24 <%= link_to "New #{@scaffold_singular_name}", :action => "new#{@scaffold_suffix}" %> -
actionpack/README
old new 177 177 {Learn more}[link:classes/ActionView/Helpers/JavaScriptHelper.html] 178 178 179 179 180 * Pagination for navigating lists of results.180 * Deprecated: Pagination for navigating lists of results. 181 181 182 # controller 183 def list 184 @pages, @people = 185 paginate :people, :order => 'last_name, first_name' 186 end 187 188 # view 189 <%= link_to "Previous page", { :page => @pages.current.previous } if @pages.current.previous %> 190 <%= link_to "Next page", { :page => @pages.current.next } if @pages.current.next %> 191 182 Pagination is deprecated and will be removed in Rails 2.0. It's recommended that you instead use the superior 'will_paginate' plugin. 183 192 184 {Learn more}[link:classes/ActionController/Pagination.html] 193 185 194 186