Changeset 6925
- Timestamp:
- 06/01/07 17:14:14 (1 year ago)
- Files:
-
- trunk/activeresource/CHANGELOG (modified) (1 diff)
- trunk/activeresource/lib/active_resource/base.rb (modified) (1 diff)
- trunk/activeresource/test/base_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activeresource/CHANGELOG
r6864 r6925 1 1 *SVN* 2 3 * pass the prefix_options to the instantiated record when using find without a specific id. Closes #8544 [alloy] 2 4 3 5 * Recognize and raise an exception on 405 Method Not Allowed responses. #7692 [Josh Peek] trunk/activeresource/lib/active_resource/base.rb
r6703 r6925 162 162 prefix_options, query_options = split_options(options[:params]) 163 163 path = collection_path(prefix_options, query_options) 164 instantiate_collection( connection.get(path, headers) || [])164 instantiate_collection( (connection.get(path, headers) || []), prefix_options ) 165 165 end 166 166 end trunk/activeresource/test/base_test.rb
r6703 r6925 314 314 end 315 315 316 def test_update_with_custom_prefix 316 def test_update_with_custom_prefix_with_specific_id 317 317 addy = StreetAddress.find(1, :params => { :person_id => 1 }) 318 318 addy.street = "54321 Street" … … 322 322 end 323 323 324 def test_update_with_custom_prefix_without_specific_id 325 addy = StreetAddress.find(:first, :params => { :person_id => 1 }) 326 addy.street = "54321 Lane" 327 assert_kind_of StreetAddress, addy 328 assert_equal "54321 Lane", addy.street 329 addy.save 330 end 331 324 332 def test_update_conflict 325 333 ActiveResource::HttpMock.respond_to do |mock|