tramway-admin 1.21.1 → 1.21.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/app/controllers/tramway/admin/application_controller.rb +2 -6
- data/app/helpers/tramway/admin/application_helper.rb +1 -0
- data/app/helpers/tramway/admin/records_helper.rb +5 -5
- data/lib/tramway/admin/additional_buttons.rb +2 -0
- data/lib/tramway/admin/notifications.rb +2 -0
- data/lib/tramway/admin/records_models.rb +2 -0
- data/lib/tramway/admin/singleton_models.rb +2 -0
- data/lib/tramway/admin/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: d9d081922ba193397dcb8b747ab6374c0c2b5f55a1419f00715f2cb7e57947cc
|
|
4
|
+
data.tar.gz: ffc260a5619cd6e03c6afebfb57e27d1c1c48767b4c88af2cdf7a9cb04a0bdc2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9902ffec400d49cfff4e7d1ef44a7897810f139a812fc64412b5e8a9eeeea9a3577399f0ce167ed9e2d861776615a96ce0d001a3a89713ee91396610f56e5795
|
|
7
|
+
data.tar.gz: cc1b9ce877f20e392676738dd0d7f9fbf2def59e7b789401bd1b808a3abbcaf61e108a00b8ec8f4289d7472ca0b26146d815422dde042adf506fbda1c6e7b40e
|
|
@@ -20,15 +20,11 @@ module Tramway
|
|
|
20
20
|
protected
|
|
21
21
|
|
|
22
22
|
def check_available!
|
|
23
|
-
unless model_given?
|
|
24
|
-
raise 'Model is not available'
|
|
25
|
-
end
|
|
23
|
+
raise 'Model is not available' unless model_given?
|
|
26
24
|
end
|
|
27
25
|
|
|
28
26
|
def check_available_scope!
|
|
29
|
-
if params[:scope].present? && !available_scope_given?
|
|
30
|
-
raise 'Scope is not available'
|
|
31
|
-
end
|
|
27
|
+
raise 'Scope is not available' if params[:scope].present? && !available_scope_given?
|
|
32
28
|
end
|
|
33
29
|
|
|
34
30
|
def collections_counts
|
|
@@ -15,6 +15,7 @@ module Tramway
|
|
|
15
15
|
include ::Tramway::Admin::InputsHelper
|
|
16
16
|
include ::Tramway::Admin::FocusGeneratorHelper
|
|
17
17
|
include ::Tramway::Collections::Helper
|
|
18
|
+
include ::Tramway::Core::CopyToClipboardHelper
|
|
18
19
|
|
|
19
20
|
def object_type(object)
|
|
20
21
|
object_class_name = if object.class.ancestors.include? ::Tramway::Core::ApplicationDecorator
|
|
@@ -81,11 +81,11 @@ module Tramway::Admin
|
|
|
81
81
|
|
|
82
82
|
if association.options[:as].present? # polymorphic? conditiion
|
|
83
83
|
new_record_path model: association.class_name,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
redirect: current_model_record_path(object),
|
|
85
|
+
association.options[:class_name].underscore => {
|
|
86
|
+
association.options[:as] => object.id,
|
|
87
|
+
association.type => object.class.model_name
|
|
88
|
+
}
|
|
89
89
|
else
|
|
90
90
|
new_record_path model: association.class_name,
|
|
91
91
|
redirect: current_model_record_path(object.model),
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tramway-admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.21.
|
|
4
|
+
version: 1.21.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: 2020-01-
|
|
11
|
+
date: 2020-01-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bootstrap-kaminari-views
|