backframe 0.0.34 → 0.0.35
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76ad813263368a934f83c57b2148506385542150
|
4
|
+
data.tar.gz: 036b8c08c5fe57f6cdd426c4de2c08b13e076d4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1531c98115b1fd7ffcc32f04bfb4803fdad9f577a7bd239165039cf9dcde9cc8a77a88faec9ede2b4db43b9ab4f0abdd64c781fc824617c30f939ed75b39eaf7
|
7
|
+
data.tar.gz: cebf6520d46729d06d95739532df70585bc5bdbc05510686e2a1b20d7c576394f979cc797ac4f0a32b57ed12541aef41418aa6bb76eed83f41f37aadce152ae6
|
@@ -26,7 +26,7 @@ module Backframe
|
|
26
26
|
private
|
27
27
|
|
28
28
|
def uncast_phone_#{entity}
|
29
|
-
self.#{entity} =
|
29
|
+
self.#{entity} = self.#{entity}[0]+'-'+self.#{entity}[1,3]+'-'+self.#{entity}[4,3]+'-'+self.#{entity}[7,4]
|
30
30
|
end
|
31
31
|
|
32
32
|
def cast_phone_#{entity}
|
@@ -41,8 +41,7 @@ module Backframe
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def #{entity}_to_international(value)
|
44
|
-
|
45
|
-
newvalue = value.gsub(regex, '')
|
44
|
+
newvalue = value.gsub('(', '').gsub(')', '').gsub('.', '').gsub('-', '').gsub(' ', '')
|
46
45
|
newvalue = (newvalue.length == 10) ? '1'+value : value
|
47
46
|
Phony.normalize(newvalue)
|
48
47
|
end
|
@@ -10,7 +10,8 @@ module Backframe
|
|
10
10
|
conditions = []
|
11
11
|
params = []
|
12
12
|
fields.each do |field|
|
13
|
-
|
13
|
+
column = (field.match(/.*\..*/)) ? field : "LOWER(\"#{self.table_name}\".\"#{field}\""
|
14
|
+
conditions << "#{column}::VARCHAR) LIKE ?"
|
14
15
|
params << '%'+filters[:q].downcase+'%'
|
15
16
|
end
|
16
17
|
args = params.unshift(conditions.join(' OR '))
|
data/lib/backframe/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backframe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Kops
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: write_xlsx
|