Changeset 6993
- Timestamp:
- 06/11/07 01:01:32 (2 years ago)
- Files:
-
- branches/1-2-stable/actionpack/CHANGELOG (modified) (2 diffs)
- branches/1-2-stable/actionpack/lib/action_controller/pagination.rb (modified) (3 diffs)
- branches/1-2-stable/actionpack/test/activerecord/pagination_test.rb (modified) (2 diffs)
- branches/1-2-stable/actionpack/test/controller/addresses_render_test.rb (modified) (1 diff)
- branches/1-2-stable/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1-2-stable/actionpack/CHANGELOG
r6803 r6993 1 1 *SVN* 2 3 * Deprecate pagination. Install the classic_pagination plugin for forward compatibility, or move to the superior will_paginate plugin. #8157 [Mislav Marohnic] 2 4 3 5 * Fix filtered parameter logging with nil parameter values. #8422 [choonkeat] … … 466 468 * Avoid naming collision among compiled view methods. [Jeremy Kemper] 467 469 468 * Fix CGI extensions when they expect string but get nil in Windows. Closes #5276 [ mislav@nippur.irb.hr]470 * Fix CGI extensions when they expect string but get nil in Windows. Closes #5276 [Mislav Marohnic] 469 471 470 472 * Determine the correct template_root for deeply nested components. #2841 [s.brink@web.de] branches/1-2-stable/actionpack/lib/action_controller/pagination.rb
r4953 r6993 2 2 # === Action Pack pagination for Active Record collections 3 3 # 4 # DEPRECATION WARNING: Pagination will be separated into its own plugin with Rails 2.0. 4 # DEPRECATION WARNING: Pagination will be moved to a plugin in Rails 2.0. 5 # Install the classic_pagination plugin for forward compatibility: 6 # script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination 5 7 # 6 8 # The Pagination module aids in the process of paging large collections of … … 131 133 end 132 134 135 deprecate :paginate => 'Pagination is moving to a plugin in Rails 2.0: script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination' 136 133 137 # These methods become class methods on any controller 134 138 module ClassMethods … … 149 153 end 150 154 end 155 156 deprecate :paginate => 'Pagination is moving to a plugin in Rails 2.0: script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination' 151 157 end 152 158 branches/1-2-stable/actionpack/test/activerecord/pagination_test.rb
r4807 r6993 6 6 class PaginationController < ActionController::Base 7 7 self.template_root = "#{File.dirname(__FILE__)}/../fixtures/" 8 9 around_filter :silence_deprecation_warnings 8 10 9 11 def simple_paginate … … 67 69 :count => "d.id") 68 70 render :nothing => true 71 end 72 73 74 def silence_deprecation_warnings 75 ActiveSupport::Deprecation.silence do 76 yield 77 end 69 78 end 70 79 branches/1-2-stable/actionpack/test/controller/addresses_render_test.rb
r4973 r6993 40 40 41 41 def test_list 42 get :list 42 # because pagination is deprecated 43 ActiveSupport::Deprecation.silence do 44 get :list 45 end 43 46 assert_equal "We only need to get this far!", @response.body.chomp 44 47 end branches/1-2-stable/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb
r5758 r6993 2 2 3 3 class DeprecatedBaseMethodsTest < Test::Unit::TestCase 4 # ActiveRecord model mock to test pagination deprecation 5 class DummyModel 6 def self.find(*args) [] end 7 def self.count(*args) 0 end 8 end 9 4 10 class Target < ActionController::Base 5 11 def deprecated_symbol_parameter_to_url_for … … 19 25 end 20 26 27 def pagination 28 paginate :dummy_models, :class_name => 'DeprecatedBaseMethodsTest::DummyModel' 29 render :nothing => true 30 end 31 21 32 def rescue_action(e) raise e end 22 33 end … … 28 39 @response = ActionController::TestResponse.new 29 40 @controller = Target.new 41 @controller.logger = Logger.new(nil) unless @controller.logger 30 42 end 31 43 … … 58 70 assert_not_deprecated { error.message } 59 71 end 72 73 def test_pagination_deprecation 74 assert_deprecated('svn://errtheblog.com/svn/plugins/classic_pagination') do 75 get :pagination 76 end 77 end 60 78 end