mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fixed query methods on resources. [Cody Fauser]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6972 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
7de21cc1c5
commit
bfda4cdc5a
3 changed files with 4 additions and 1 deletions
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue