query value is converted to_s instead of to_yaml
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
This commit is contained in:
parent
02a5842cd0
commit
7e4e1f0ca5
@ -30,7 +30,7 @@ def quote(value, column = nil)
|
||||
if value.acts_like?(:date) || value.acts_like?(:time)
|
||||
"'#{quoted_date(value)}'"
|
||||
else
|
||||
"'#{quote_string(value.to_yaml)}'"
|
||||
"'#{quote_string(value.to_s)}'"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -693,6 +693,14 @@ def test_find_all_by_one_attribute
|
||||
assert_equal [], Topic.find_all_by_title("The First Topic!!")
|
||||
end
|
||||
|
||||
def test_find_all_by_one_attribute_which_is_a_symbol
|
||||
topics = Topic.find_all_by_content("Have a nice day".to_sym)
|
||||
assert_equal 2, topics.size
|
||||
assert topics.include?(topics(:first))
|
||||
|
||||
assert_equal [], Topic.find_all_by_title("The First Topic!!")
|
||||
end
|
||||
|
||||
def test_find_all_by_one_attribute_that_is_an_aggregate
|
||||
balance = customers(:david).balance
|
||||
assert_kind_of Money, balance
|
||||
|
Loading…
Reference in New Issue
Block a user