dolar-bna 1.2.3.3 → 1.2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dolar/app/models/dolar_cotization.rb +9 -1
- data/lib/dolar/bna/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 92664086c5f075c10681663cb8161c86501cea446de236e0cab2a42b6a726acc
|
|
4
|
+
data.tar.gz: a32d122827292a9f0e4159be824a74ca97c9c0a6417fdaf7bc2b2a4697efd259
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e50923ac237f37e72175393a92993b4e8259ccc2d2b063b49dc29b5b488ec4c58c5bf2d78af65b66981f280741915e109234bbf2e2238688010141c52d65591
|
|
7
|
+
data.tar.gz: 4b0341143e32856b5b5bbbcd9ca54f2dbd5860f28535ec00c7caeed4f7cf8725a6d3a09b320b22b8921a211f283b01810010bc035781964b6e0c7b57d0c74072
|
|
@@ -9,7 +9,7 @@ module Dolar
|
|
|
9
9
|
validates_numericality_of :dolar_buy, greater_than: 0, message: 'La cotizacion debe ser mayor a 0'
|
|
10
10
|
validates_numericality_of :dolar_sell, greater_than: 0, message: 'La cotizacion debe ser mayor a 0'
|
|
11
11
|
#validates_uniqueness_of :date, scope: [:dolar_type, :dolar_sell], if: :message: 'Ya existe una cotización de ese tipo para la fecha ingresada'
|
|
12
|
-
DOLAR_TYPES = ["Divisa", "Billete", "Blue"]
|
|
12
|
+
DOLAR_TYPES = ["Divisa", "Billete", "Blue", "MEP", "CCL", "Tarjeta"]
|
|
13
13
|
|
|
14
14
|
validates_inclusion_of :dolar_type, in: DOLAR_TYPES, message: 'Tipo de cotización inválido'
|
|
15
15
|
|
|
@@ -31,6 +31,14 @@ module Dolar
|
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
def self.search_by_dolar_type search
|
|
35
|
+
unless search.blank?
|
|
36
|
+
where(dolar_type: search)
|
|
37
|
+
else
|
|
38
|
+
all
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
34
42
|
end
|
|
35
43
|
|
|
36
44
|
end
|
data/lib/dolar/bna/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dolar-bna
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- LITECODE
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: factory_bot
|