diff options
author | Tobias Lütke <tobias.luetke@gmail.com> | 2007-06-08 19:32:15 +0000 |
---|---|---|
committer | Tobias Lütke <tobias.luetke@gmail.com> | 2007-06-08 19:32:15 +0000 |
commit | bfda4cdc5a0ac1b8e846f0838eca36075b3be987 (patch) | |
tree | 052075492f7d7f38efeaf3257c5ffed5db816d0f | |
parent | 7de21cc1c5ae899207f9aab9e111eda265bb2f32 (diff) | |
download | rails-bfda4cdc5a0ac1b8e846f0838eca36075b3be987.tar.gz rails-bfda4cdc5a0ac1b8e846f0838eca36075b3be987.tar.bz2 rails-bfda4cdc5a0ac1b8e846f0838eca36075b3be987.zip |
Fixed query methods on resources. [Cody Fauser]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6972 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | activeresource/CHANGELOG | 2 | ||||
-rw-r--r-- | activeresource/lib/active_resource/base.rb | 2 | ||||
-rw-r--r-- | activeresource/test/base_test.rb | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/activeresource/CHANGELOG b/activeresource/CHANGELOG index 35321a2f4f..08a4e6a56b 100644 --- a/activeresource/CHANGELOG +++ b/activeresource/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fix query methods on resources. [Cody Fauser] + * pass the prefix_options to the instantiated record when using find without a specific id. Closes #8544 [alloy] * Recognize and raise an exception on 405 Method Not Allowed responses. #7692 [Josh Peek] diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index 3048aa5b89..78d1c0033a 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -415,7 +415,7 @@ module ActiveResource when "=" attributes[method_name.first(-1)] = arguments.first when "?" - attributes[method_name.first(-1)] == true + attributes[method_name.first(-1)] else attributes.has_key?(method_name) ? attributes[method_name] : super end diff --git a/activeresource/test/base_test.rb b/activeresource/test/base_test.rb index bf73732c8f..6c924447de 100644 --- a/activeresource/test/base_test.rb +++ b/activeresource/test/base_test.rb @@ -181,6 +181,7 @@ class BaseTest < Test::Unit::TestCase matz = Person.find(1) assert_kind_of Person, matz assert_equal "Matz", matz.name + assert matz.name? end def test_respond_to |