recordselect 3.4.7 → 3.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/record_select/conditions.rb +2 -1
- data/lib/record_select/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5edf7ddc2f3ac75c1e7a4c1d5eeb181cded8a04
|
4
|
+
data.tar.gz: b32d4aa6c7cd22208d4b42f857b59a5d64c0bd5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d2d958216379cb4f9d8e7c20a2c5d7fad70843b506a6c888692ac1d1a16afae858746b4ce554509598e0c79f3e92105ca31705730733ffedf4ec6ee89c3c820
|
7
|
+
data.tar.gz: 3e7fc87a826167399dbcf3a6baf32813dcd74fd75b48671fa74f22c451a8e3091f1319f77585d0f760887ff18c4c45b2ed31e21d713ac3fc86703dc01b1c1f4b
|
@@ -70,6 +70,7 @@ module RecordSelect
|
|
70
70
|
conditions
|
71
71
|
end
|
72
72
|
|
73
|
+
@@type_cast_method = Rails.version < '4.2' ? :type_cast : :type_cast_from_user
|
73
74
|
# generates an SQL condition for the given column/value
|
74
75
|
def record_select_condition_for_column(column, value)
|
75
76
|
model = record_select_config.model
|
@@ -79,7 +80,7 @@ module RecordSelect
|
|
79
80
|
elsif column.text?
|
80
81
|
["LOWER(#{column_name}) LIKE ?", value]
|
81
82
|
else
|
82
|
-
["#{column_name} = ?", column.
|
83
|
+
["#{column_name} = ?", column.send(@@type_cast_method, value)]
|
83
84
|
end
|
84
85
|
end
|
85
86
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recordselect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Cambra
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-08-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: shoulda
|