azahara_schema 0.4.1 → 0.4.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9abad55e1cb8f8e4c6fe632e5bfa1c9fdf7d394af60e7623ba9ee961d9e94c49
4
- data.tar.gz: 2879cbe15b1426c44e4c6b07896432db3ae7b3c8b8fa91b234d76085a16df36c
3
+ metadata.gz: 2132a174a1520fef9fe4a25f2e04073be787db2c4c4038cb135b735db39bf947
4
+ data.tar.gz: 538a13989702d474192aae6f700f244919bdfbf7588a113cbfae315dcdcfcb05
5
5
  SHA512:
6
- metadata.gz: 3c6b320eaa6e40c343da6ff038ee385f960ccb75a8ffecea122f29c994573ddc8740f11c21703acc21f093f3516f78f207ecf501135d5984d9c390401039e5fe
7
- data.tar.gz: e29e129457bf1cdcb4aa4e5889b70592321a88153b0a971ce5aa682b42294bea52d6f5bd4784933c06924a7e080f895ff4bd8bb46e946a756763149c26217275
6
+ metadata.gz: 3590ecc5fbd832a860ab917552c260058873370bf07c3b9b9d3b379d1c63f066cf1570503b70bf75d6a763e4802b8b70bf8e3eee1cb795bb2c80621b25235430
7
+ data.tar.gz: 5a856fcf275d30da1991ddcb36243a0759101a525483850146f26dc6e3c41ad8ccc0393eb8b7e686e5e15ed239f1e3f3bd03ab1869c0cd28a25ec6b111307985
@@ -22,10 +22,10 @@
22
22
  <%= render output, local_assigns.merge(schema: schema) %>
23
23
  <% end %>
24
24
  <div class="exports text-right">
25
- <% if (csv_path = azahara_export_path(schema, :csv)) %>
26
- <%= link_to csv_path do %>
25
+ <% if (xlsx_path = azahara_export_path(schema, :xlsx)) %>
26
+ <%= link_to xlsx_path do %>
27
27
  <i class="fa fa-file-o"></i>
28
- <%= t('label_export_as', as: 'CSV') %>
28
+ <%= t('label_export_as', as: 'XLSX') %>
29
29
  <% end %>
30
30
  <% end %>
31
31
  </div>
@@ -25,6 +25,5 @@ module AzaharaSchema
25
25
  val = BigDecimal(val.to_s.presence || 0) unless val.is_a?(BigDecimal)
26
26
  val
27
27
  end
28
-
29
28
  end
30
29
  end
@@ -324,7 +324,11 @@ module AzaharaSchema
324
324
  #serialization
325
325
  def from_params(params)
326
326
  if params[:f]
327
- filter_params = params[:f].permit(available_filters.keys + [available_filters.keys.inject({}){|o,name| o[name] = []; o }]).to_h
327
+ if params.class == ActionController::Parameters
328
+ filter_params = params[:f].permit(available_filters.keys + [available_filters.keys.inject({}){|o,name| o[name] = []; o }]).to_h
329
+ else
330
+ filter_params = params[:f].slice(available_filters.keys + [available_filters.keys.inject({}){|o,name| o[name] = []; o }]).to_h
331
+ end
328
332
  filter_params.each do |name, filter_value|
329
333
  next if filter_value.blank?
330
334
  if filter_value.is_a?(Array)
@@ -1,3 +1,3 @@
1
1
  module AzaharaSchema
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azahara_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-21 00:00:00.000000000 Z
11
+ date: 2021-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails