dolar-bna 1.2.3.2 → 1.2.3.3
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 +17 -0
- 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: 4b88a61d86e3cd929cd4cdadebf627a3f5bcf337da6bae478a5656391431ef77
|
|
4
|
+
data.tar.gz: aa8229eca83b4c8c63b4ad96e1b2479357fce1d75a086c67bfe59aa957f962af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e80621012935cecb170116bafa000b47f05644db3b6aeda06f31eb61af573616ef82ee531ec16b6d16cec3aad75c16b46eeb2d63a9bfd08d7d0554bff3322579
|
|
7
|
+
data.tar.gz: 89481981c34a1b39e478656b6bf9e9740eaa1bb62b2712e510d9f72668409e88b7f5f01cab89e4e2337a29e80b24dca0fd094d6e77345c0fa4ba1b9c93e40e43
|
|
@@ -13,6 +13,23 @@ module Dolar
|
|
|
13
13
|
|
|
14
14
|
validates_inclusion_of :dolar_type, in: DOLAR_TYPES, message: 'Tipo de cotización inválido'
|
|
15
15
|
|
|
16
|
+
def self.search_by_date_range search
|
|
17
|
+
unless search.blank?
|
|
18
|
+
# La fecha la pasa un daterangepicker que la envia en este formato '01/01/2023 - 31/12/2023'
|
|
19
|
+
first_date, last_date = search.split(" - ")
|
|
20
|
+
where(date: first_date .. last_date)
|
|
21
|
+
else
|
|
22
|
+
all
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.search_by_date search
|
|
27
|
+
unless search.blank?
|
|
28
|
+
where(date: search)
|
|
29
|
+
else
|
|
30
|
+
all
|
|
31
|
+
end
|
|
32
|
+
end
|
|
16
33
|
|
|
17
34
|
end
|
|
18
35
|
|
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.3.
|
|
4
|
+
version: 1.2.3.3
|
|
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-10-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: factory_bot
|