File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed
activerecord/lib/active_record/connection_adapters Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -863,8 +863,8 @@ def version_string
863
863
class MysqlString < Type ::String # :nodoc:
864
864
def serialize ( value )
865
865
case value
866
- when true then MySQL :: Quoting :: QUOTED_TRUE
867
- when false then MySQL :: Quoting :: QUOTED_FALSE
866
+ when true then "1"
867
+ when false then "0"
868
868
else super
869
869
end
870
870
end
@@ -873,8 +873,8 @@ def serialize(value)
873
873
874
874
def cast_value ( value )
875
875
case value
876
- when true then MySQL :: Quoting :: QUOTED_TRUE
877
- when false then MySQL :: Quoting :: QUOTED_FALSE
876
+ when true then "1"
877
+ when false then "0"
878
878
else super
879
879
end
880
880
end
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ module ActiveRecord
4
4
module ConnectionAdapters
5
5
module MySQL
6
6
module Quoting # :nodoc:
7
- QUOTED_TRUE , QUOTED_FALSE = "1" . freeze , "0" . freeze
8
-
9
7
def quote_column_name ( name )
10
8
@quoted_column_names [ name ] ||= "`#{ super . gsub ( '`' , '``' ) } `" . freeze
11
9
end
@@ -14,18 +12,10 @@ def quote_table_name(name)
14
12
@quoted_table_names [ name ] ||= super . gsub ( "." , "`.`" ) . freeze
15
13
end
16
14
17
- def quoted_true
18
- QUOTED_TRUE
19
- end
20
-
21
15
def unquoted_true
22
16
1
23
17
end
24
18
25
- def quoted_false
26
- QUOTED_FALSE
27
- end
28
-
29
19
def unquoted_false
30
20
0
31
21
end
You can’t perform that action at this time.
0 commit comments