kasket 4.5.0 → 4.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kasket/configuration_mixin.rb +8 -9
- data/lib/kasket/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e712453519dbc2e9d65176a7b2643f5d93f5fbc
|
4
|
+
data.tar.gz: fe75bab997f46475cb7fdcf23302d02f85335e9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c7846aae753e06fd1a39bff78cb6bc84b6602cd8c6245dc2bff0d4b9705ded35723f005f2e27b4bf838e05afba59542d5c826793c90be5d6afd4fc702ad2532
|
7
|
+
data.tar.gz: 4ae174cf74a6176f843ff40bffcc965ccb9ea78dba55a3f6d19f2621b2d96ae218d0521391173c0b250e586c4e427c07c3e41d37e5779aed2619342a56604616
|
@@ -38,7 +38,7 @@ module Kasket
|
|
38
38
|
key = attribute_value_pairs.map do |attribute, value|
|
39
39
|
column = columns_hash[attribute.to_s]
|
40
40
|
value = nil if value.blank?
|
41
|
-
"#{attribute}=#{
|
41
|
+
"#{attribute}=#{kasket_quoted_value_for_column(value, column)}"
|
42
42
|
end.join('/')
|
43
43
|
|
44
44
|
if key.size > (250 - kasket_key_prefix.size) || key =~ /\s/
|
@@ -95,17 +95,16 @@ module Kasket
|
|
95
95
|
|
96
96
|
private
|
97
97
|
|
98
|
-
def
|
98
|
+
def kasket_quoted_value_for_column(value, column)
|
99
99
|
if column
|
100
|
+
conn = connection
|
100
101
|
casted_value =
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
else
|
106
|
-
column.type_cast(value)
|
102
|
+
case ActiveRecord::VERSION::MAJOR
|
103
|
+
when 3 then column.type_cast(value)
|
104
|
+
when 4 then column.type_cast_for_database(value)
|
105
|
+
else conn.type_cast_from_column(column, value)
|
107
106
|
end
|
108
|
-
|
107
|
+
conn.quote(casted_value).downcase
|
109
108
|
else
|
110
109
|
value.to_s
|
111
110
|
end
|
data/lib/kasket/version.rb
CHANGED