active_scaffold_export 3.11.1 → 3.11.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 +4 -4
- data/lib/active_scaffold/actions/export.rb +12 -6
- data/lib/active_scaffold_export/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: 1c5a31084ab9ee69ba6480602feacb14d935f144d26c17b90d3bd4698ceb0053
|
|
4
|
+
data.tar.gz: 5c37fc683df4653d2b71cca0ae24f890b8210e45dc13d8cb81515c6b94250358
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 646be1b196f36730cd8331e9f2422227b556398973ad66c97e2ff014215709a6899e219cde633b66b530c37de80d4ba15059a33ad3188e902841e4f7e6402278
|
|
7
|
+
data.tar.gz: 5edae73a37d1b5e9caf3e85b0d071f1d3ccadf8ffce4c6adb7f6fecdf5e0d42504c1fc442c30384103f64a400b816f787ca60b64e08e16c169e908f3e971c3fa
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module ActiveScaffold::Actions
|
|
2
2
|
module Export
|
|
3
3
|
def self.included(base)
|
|
4
|
-
base.before_action :
|
|
5
|
-
base.before_action :
|
|
4
|
+
base.before_action :export_authorized_filter, :only => [:export]
|
|
5
|
+
base.before_action :show_export_authorized_filter, :only => [:show_export]
|
|
6
6
|
base.helper_method :export_columns_names
|
|
7
7
|
end
|
|
8
8
|
|
|
@@ -10,11 +10,9 @@ module ActiveScaffold::Actions
|
|
|
10
10
|
def show_export
|
|
11
11
|
@export_config = active_scaffold_config.export
|
|
12
12
|
respond_to do |wants|
|
|
13
|
-
wants.html
|
|
14
|
-
render(:partial => 'show_export', :layout => true)
|
|
15
|
-
end
|
|
13
|
+
wants.html
|
|
16
14
|
wants.js do
|
|
17
|
-
render
|
|
15
|
+
render partial: 'show_export'
|
|
18
16
|
end
|
|
19
17
|
end
|
|
20
18
|
end
|
|
@@ -180,10 +178,18 @@ module ActiveScaffold::Actions
|
|
|
180
178
|
authorized_for?(:action => :read)
|
|
181
179
|
end
|
|
182
180
|
|
|
181
|
+
def export_authorized_filter
|
|
182
|
+
raise ActiveScaffold::ActionNotAllowed unless export_authorized?
|
|
183
|
+
end
|
|
184
|
+
|
|
183
185
|
def show_export_authorized?
|
|
184
186
|
export_authorized?
|
|
185
187
|
end
|
|
186
188
|
|
|
189
|
+
def show_export_authorized_filter
|
|
190
|
+
raise ActiveScaffold::ActionNotAllowed unless show_export_authorized?
|
|
191
|
+
end
|
|
192
|
+
|
|
187
193
|
def export_formats
|
|
188
194
|
active_scaffold_config.export.formats
|
|
189
195
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_scaffold_export
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.11.
|
|
4
|
+
version: 3.11.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Volker Hochstein
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2026-03-
|
|
13
|
+
date: 2026-03-24 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: active_scaffold
|