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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 797b8646f1afd946efe3b2926e75d95f056b6dd190d8424357e5b78c06bf70b9
|
4
|
+
data.tar.gz: 1ff12e2b514aa49dec363ebb473276df849f3504dbfd693ec29c8333424ca15f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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?(
|
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
|
data/lib/tramway/export.rb
CHANGED
@@ -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
|
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.
|
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-
|
11
|
+
date: 2021-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xls_exporter
|