aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activeresource/CHANGELOG2
-rw-r--r--activeresource/lib/active_resource/base.rb2
-rw-r--r--activeresource/test/base_test.rb1
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