diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-25 23:09:52 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-25 23:09:52 +0000 |
commit | 5b63c843074dc74b11e821bd286422d80de20c9d (patch) | |
tree | a893fb27345489fa8c619a24b2865432935ce384 /activerecord/lib/active_record/connection_adapters | |
parent | 1d79a17c25c0b7efc414ba2c3d81b3ad30fbb9e4 (diff) | |
download | rails-5b63c843074dc74b11e821bd286422d80de20c9d.tar.gz rails-5b63c843074dc74b11e821bd286422d80de20c9d.tar.bz2 rails-5b63c843074dc74b11e821bd286422d80de20c9d.zip |
Fixed db_schema_import when binary types are present (closes #3101) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4031 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/quoting.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb index acfd0f0846..8d8d085bb1 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb @@ -6,7 +6,7 @@ module ActiveRecord def quote(value, column = nil) case value when String - if column && column.type == :binary + if column && column.type == :binary && column.class.respond_to?(:string_to_binary) "'#{quote_string(column.class.string_to_binary(value))}'" # ' (for ruby-mode) elsif column && [:integer, :float].include?(column.type) value.to_s |