dolar-bna 1.2.3.2 → 1.2.3.3

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
  SHA256:
3
- metadata.gz: 1cbcfaa9b06320e9a61b7702501b6e73d2e3605028d4fdaf89e23eb0a61eeebd
4
- data.tar.gz: 78fb1dace007e69b75ff62057f726fd9223daed04125597446d436000980d44b
3
+ metadata.gz: 4b88a61d86e3cd929cd4cdadebf627a3f5bcf337da6bae478a5656391431ef77
4
+ data.tar.gz: aa8229eca83b4c8c63b4ad96e1b2479357fce1d75a086c67bfe59aa957f962af
5
5
  SHA512:
6
- metadata.gz: 36e33fd2c386b265db62b34aee5d8fc16ca26c0a75b256ca82280cda38b203a71f41fe3c2255e7d922be34c54fd15e05305cd0fbabcd1a1a5cb86824fde6c80b
7
- data.tar.gz: 0d8f89c6599d7b06b30680a1cd4bec10fd1b0d52643195e96401e4228eaba5065bb721091ab0e95344f3f7edd1db184b3bf1d60242b645a0685d54d9a72a8b49
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
 
@@ -1,5 +1,5 @@
1
1
  module Dolar
2
2
  module Bna
3
- VERSION = "1.2.3.2"
3
+ VERSION = "1.2.3.3"
4
4
  end
5
5
  end
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.2
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-09-20 00:00:00.000000000 Z
11
+ date: 2023-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: factory_bot