aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-02-02 10:25:38 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-02-02 10:25:53 -0800
commit8bfa8e7cbea1fb65b180260c55a7f146efbd5b05 (patch)
tree613fa06f537a876525e009a8407718985134ceac
parent3fc598095e8e560a29cbefec643d991cfe0131c8 (diff)
downloadrails-8bfa8e7cbea1fb65b180260c55a7f146efbd5b05.tar.gz
rails-8bfa8e7cbea1fb65b180260c55a7f146efbd5b05.tar.bz2
rails-8bfa8e7cbea1fb65b180260c55a7f146efbd5b05.zip
this method should never return nil
-rw-r--r--activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
index babdf4cb58..a04fc01d6f 100644
--- a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
@@ -85,7 +85,7 @@ module ActiveRecord
when :datetime, :timestamp then "#{var_name}.class == Time ? #{var_name} : #{self.class.name}.string_to_time(#{var_name})"
when :time then "#{var_name}.class == Time ? #{var_name} : #{self.class.name}.string_to_dummy_time(#{var_name})"
when :date then "#{var_name}.class == Date ? #{var_name} : #{self.class.name}.string_to_date(#{var_name})"
- when :binary then nil
+ when :binary then var_name
when :boolean then "#{self.class.name}.value_to_boolean(#{var_name})"
else var_name
end