sale 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sale/buyers.rb +2 -2
- data/sale.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 450588d444cde46db5fc732c7d89d10633e3372e2dff6e4fc88d33a2f2d0c269
|
4
|
+
data.tar.gz: '030684795a3a9e69fae7bf98a845811d6e159bbedc8574af59ae3791135f7f91'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5778d3a4424179c537181faf397a02960f798f35df3f8987f80811c774e30cc9d3d03b1795c0dd4a923b798fe3d3b78d54c3c2ff170669755ed2f7382b395292
|
7
|
+
data.tar.gz: e70e56d8d47f6f7067605ca08e1d3178d362218099973daa5161f21ada54561883d72a33b6ab5a4696dc039ffc1dc1e50f7a5bea6ee88a4846d0b8261272a38c
|
data/lib/sale/buyers.rb
CHANGED
@@ -32,9 +32,9 @@ class Bsale::Buyers
|
|
32
32
|
|
33
33
|
def find_or_create(data)
|
34
34
|
matches = if data[:code].present? # has rut, either from order contact info or company record
|
35
|
-
find_all_by_code(
|
35
|
+
find_all_by_code(data[:code])
|
36
36
|
else
|
37
|
-
find_all_by_code(FakeRUT.for(data[:
|
37
|
+
find_all_by_code(FakeRUT.for(data[:email]))
|
38
38
|
end
|
39
39
|
|
40
40
|
matches.any ? matches.first : create(data)
|
data/sale.gemspec
CHANGED