aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb20
1 files changed, 6 insertions, 14 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 1c3d10c15d..97bc5edd4b 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
@@ -979,22 +979,14 @@ module ActiveRecord
end
class MysqlString < Type::String # :nodoc:
- def serialize(value)
- case value
- when true then MySQL::Quoting::QUOTED_TRUE
- when false then MySQL::Quoting::QUOTED_FALSE
- else super
- end
- end
-
private
- def cast_value(value)
- case value
- when true then MySQL::Quoting::QUOTED_TRUE
- when false then MySQL::Quoting::QUOTED_FALSE
- else super
- end
+ def casted_true
+ MySQL::Quoting::QUOTED_TRUE
+ end
+
+ def casted_false
+ MySQL::Quoting::QUOTED_FALSE
end
end