diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-04-04 22:13:10 -0300 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-04-04 22:13:10 -0300 |
commit | dcffeaea66130a8aa5f1591912bd8a335960bc14 (patch) | |
tree | 96f852a34d34324f8f9922a082aec9aa3a682c5c /activerecord/lib/active_record | |
parent | bd49325e3ba9fba3bbea2d32b3e7a71ec1934c55 (diff) | |
parent | 72ecb9fc42fe0fe904b7c742036cdafa358c3cab (diff) | |
download | rails-dcffeaea66130a8aa5f1591912bd8a335960bc14.tar.gz rails-dcffeaea66130a8aa5f1591912bd8a335960bc14.tar.bz2 rails-dcffeaea66130a8aa5f1591912bd8a335960bc14.zip |
Merge pull request #24426 from yui-knk/refactor_mysql2
Use `QUOTED_TRUE` and `QUOTED_FALSE` instead of magic strings
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb index 8015d1ed9e..f6766b996f 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb @@ -939,8 +939,8 @@ module ActiveRecord class MysqlString < Type::String # :nodoc: def serialize(value) case value - when true then "1" - when false then "0" + when true then QUOTED_TRUE + when false then QUOTED_FALSE else super end end @@ -949,8 +949,8 @@ module ActiveRecord def cast_value(value) case value - when true then "1" - when false then "0" + when true then QUOTED_TRUE + when false then QUOTED_FALSE else super end end |