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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed771a7ed354634ca037874a20894a164598f61d
4
- data.tar.gz: a9d52d7bf8a39ae8cd3a93e30836779654c1a01c
3
+ metadata.gz: a5edf7ddc2f3ac75c1e7a4c1d5eeb181cded8a04
4
+ data.tar.gz: b32d4aa6c7cd22208d4b42f857b59a5d64c0bd5e
5
5
  SHA512:
6
- metadata.gz: 3736a19d08e171c73916650ea0d0db6e0bc6df246d4f5829dff13748ea5842208a9090f7da9082b8ec67050541fd7aef56492775563a6ebc78f12369bef3ff7e
7
- data.tar.gz: aae171c3ad9c9d491ccb2d9f04061860f3bccfd9a7f94fe4da77e99115aea5466f5bb5c077d62521f0dad7624f20e0185cc14479a401e8561d81ed561ae233ac
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.type_cast(value)]
83
+ ["#{column_name} = ?", column.send(@@type_cast_method, value)]
83
84
  end
84
85
  end
85
86
 
@@ -2,7 +2,7 @@ module RecordSelect
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 4
5
- PATCH = 7
5
+ PATCH = 8
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
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.7
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-07-30 00:00:00.000000000 Z
13
+ date: 2015-08-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: shoulda