Changeset 8503
- Timestamp:
- 12/28/07 17:12:35 (8 months ago)
- Files:
-
- trunk/activeresource/CHANGELOG (modified) (1 diff)
- trunk/activeresource/lib/active_resource/base.rb (modified) (1 diff)
- trunk/activeresource/test/format_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activeresource/CHANGELOG
r8502 r8503 1 1 *SVN* 2 3 * Allow setting ActiveResource::Base#format before #site. [rick] 2 4 3 5 * Support agnostic formats when calling custom methods. Closes #10635 [joerichsen] trunk/activeresource/lib/active_resource/base.rb
r8472 r8503 193 193 194 194 write_inheritable_attribute("format", format) 195 connection.format = format 195 connection.format = format if site 196 196 end 197 197 trunk/activeresource/test/format_test.rb
r8502 r8503 65 65 end 66 66 67 def test_setting_format_before_site 68 resource = Class.new(ActiveResource::Base) 69 resource.format = :json 70 resource.site = 'http://37s.sunrise.i:3000' 71 assert_equal ActiveResource::Formats[:json], resource.connection.format 72 end 73 67 74 private 68 75 def using_format(klass, mime_type_reference)