Changeset 9053
- Timestamp:
- 03/17/08 23:45:42 (2 months ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/polymorphic_routes.rb (modified) (1 diff)
- trunk/actionpack/test/controller/polymorphic_routes_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r9052 r9053 1 1 *SVN* 2 3 * Fixed that polymorphic routes would modify the input array #11363 [thomas.lee] 2 4 3 5 * Added :format option to NumberHelper#number_to_currency to enable better localization support #11149 [lylo] trunk/actionpack/lib/action_controller/polymorphic_routes.rb
r8741 r9053 69 69 # 70 70 def polymorphic_url(record_or_hash_or_array, options = {}) 71 if record_or_hash_or_array.kind_of?(Array) 72 record_or_hash_or_array = record_or_hash_or_array.dup 73 end 74 71 75 record = extract_record(record_or_hash_or_array) 72 76 format = (options[:action].to_s == "formatted" and record_or_hash_or_array.pop) trunk/actionpack/test/controller/polymorphic_routes_test.rb
r8880 r9053 126 126 end 127 127 128 def test_polymorphic_path_does_not_modify_arguments 129 expects(:admin_article_responses_url).with(@article) 130 path = [:admin, @article, @response] 131 assert_no_difference 'path.size' do 132 polymorphic_url(path) 133 end 134 end 128 135 end 129 136 end