Changeset 5597
- Timestamp:
- 11/20/06 12:02:04 (2 years ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb (modified) (1 diff)
- trunk/activerecord/test/base_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r5596 r5597 1 1 *SVN* 2 3 * Quote ActiveSupport::Multibyte::Chars. #6653 [Julian Tarkhanov] 2 4 3 5 * Simplify query_attribute by typecasting the attribute value and checking whether it's nil, false, zero or blank. #6659 [Jonathan Viney] trunk/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
r4626 r5597 9 9 10 10 case value 11 when String 11 when String, ActiveSupport::Multibyte::Chars 12 value = value.to_s 12 13 if column && column.type == :binary && column.class.respond_to?(:string_to_binary) 13 14 "'#{quote_string(column.class.string_to_binary(value))}'" # ' (for ruby-mode) trunk/activerecord/test/base_test.rb
r5593 r5597 1103 1103 end 1104 1104 1105 def test_quote_chars 1106 str = 'The Narrator' 1107 topic = Topic.create(:author_name => str) 1108 assert_equal str, topic.author_name 1109 1110 assert_kind_of ActiveSupport::Multibyte::Chars, str.chars 1111 topic = Topic.find_by_author_name(str.chars) 1112 1113 assert_kind_of Topic, topic 1114 assert_equal str, topic.author_name, "The right topic should have been found by name even with name passed as Chars" 1115 end 1116 1105 1117 def test_class_level_destroy 1106 1118 should_be_destroyed_reply = Reply.create("title" => "hello", "content" => "world")