tramway-export 0.2.0.1 → 0.2.0.2

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: 6ceedd09b6899e510458720d4cfcd454c2cd970af2c477a30fd7bee276f12e36
4
- data.tar.gz: 885bfb4371357484d7f6b4ce25a8b0e9c0a62310b8ba15cdeb8dbda04acf3ead
3
+ metadata.gz: 797b8646f1afd946efe3b2926e75d95f056b6dd190d8424357e5b78c06bf70b9
4
+ data.tar.gz: 1ff12e2b514aa49dec363ebb473276df849f3504dbfd693ec29c8333424ca15f
5
5
  SHA512:
6
- metadata.gz: d5b762e42be643c3b72bd1f95965e0bf26882a3082ed6f6c2e627ad7cc998abf8e66bbf4892a1f0eca381dcacfd92916e45a38c4b5423b416421220b371c1f10
7
- data.tar.gz: 68343c6e8fb3315e50ccec2310a1fcd3e54ea6f765da688585b8b60af5c2ca85abc1f9fcca7f915b5e9e7619809f6a67f8c575d2ab6b63555ebfd7914994e3d2
6
+ metadata.gz: 7faa2448f27af2740baafc8ec75c32c5b545098c4955f237696213a41ce8a4e03a298e4994169fd29773e01184768f614d3b31828087eb1c58baac388e449c9d
7
+ data.tar.gz: bc1e60703f934e9803d1c9e345bf6ef9576e0401c7407918894cd1865190ab29ef0a20f93667c45cc16d00cf4a98377cd3ea1c5efde3b5b08d37e44fe8de1cd6
@@ -65,7 +65,7 @@ class Tramway::Export::ExportsController < Tramway::Admin::ApplicationController
65
65
 
66
66
  def available?
67
67
  if params[:collection].present?
68
- ::Tramway::Export.exportable_model?(params[:model], project: @application.name) && Tramway::Export.exportable_models(project: @application.name)&.map do |config|
68
+ ::Tramway::Export.exportable_model?(model_class, project: @application.name) && Tramway::Export.exportable_models(project: @application.name)&.map do |config|
69
69
  config.is_a?(Hash) && config.values.first.map(&:to_s).include?(params[:collection])
70
70
  end&.include?(true)
71
71
  else
@@ -18,7 +18,7 @@ module Tramway
18
18
  def exportable_model?(model_class, project:)
19
19
  return false unless project.present?
20
20
 
21
- @exportable_models[project.to_sym]&.include?(model_class) ||
21
+ @exportable_models[project.to_sym].map(&:to_s)&.include?(model_class.to_s) ||
22
22
  @exportable_models[project.to_sym]&.map { |config| config.is_a?(Hash) && config.keys.first.to_s == model_class.to_s }&.include?(true)
23
23
  end
24
24
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Export
5
- VERSION = '0.2.0.1'
5
+ VERSION = '0.2.0.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-export
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.1
4
+ version: 0.2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-09 00:00:00.000000000 Z
11
+ date: 2021-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xls_exporter