avo 2.28.3.pre.pr1646 → 2.29.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/helpers/avo/application_helper.rb +5 -6
- data/app/javascript/js/controllers/fields/tags_field_controller.js +4 -0
- data/lib/avo/configuration.rb +4 -6
- data/lib/avo/version.rb +1 -1
- data/lib/generators/avo/templates/initializer/avo.tt +2 -0
- data/public/avo-assets/avo.base.js +47 -47
- data/public/avo-assets/avo.base.js.map +2 -2
- metadata +4 -5
- data/config/master.key +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 572070da39670d32588de6616a4b51015615efe3482ea813fe148035bba33cf7
|
4
|
+
data.tar.gz: 9a1056b36ab1d3ceebd06eeb505fb5641f41d9ddbe943e48e87627030df2edb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95570888ee4d613f5062f3cf924aa7af69d1b6675a042da4a0ed75131a5e858ab451ab4d23c85ceed79c1a8f57508ef2dda4540cdbc7462f96ff251e1f70a20c
|
7
|
+
data.tar.gz: 3941183c0d08772696b52fdc5bac795d35002d87309dd7d5963d1f9b4d7b1107354ba3cf0d116a8752af35ec54a39e0f89de4c05df2e67df28aaa1b062aa1f39
|
data/Gemfile.lock
CHANGED
@@ -102,16 +102,15 @@ module Avo
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def root_path_without_url
|
105
|
-
Avo
|
106
|
-
.to_s
|
107
|
-
.delete_prefix(request.base_url.to_s)
|
108
|
-
.delete_suffix("/")
|
109
|
-
.gsub("/?", "?")
|
110
|
-
.query = ""
|
105
|
+
"#{Avo.configuration.prefix_path}#{mount_path}"
|
111
106
|
rescue
|
112
107
|
Avo.configuration.root_path
|
113
108
|
end
|
114
109
|
|
110
|
+
def mount_path
|
111
|
+
Avo::Engine.routes.find_script_name(params.permit!.to_h.symbolize_keys)
|
112
|
+
end
|
113
|
+
|
115
114
|
private
|
116
115
|
|
117
116
|
# Taken from the original library
|
@@ -60,6 +60,10 @@ export default class extends BaseController {
|
|
60
60
|
},
|
61
61
|
originalInputValueFormat: (valuesArr) => valuesArr.map((item) => item.value),
|
62
62
|
})
|
63
|
+
} else {
|
64
|
+
options = merge(options, {
|
65
|
+
originalInputValueFormat: (valuesArr) => valuesArr.map((item) => item.value).join(','),
|
66
|
+
})
|
63
67
|
}
|
64
68
|
|
65
69
|
return options
|
data/lib/avo/configuration.rb
CHANGED
@@ -42,6 +42,7 @@ module Avo
|
|
42
42
|
attr_accessor :field_wrapper_layout
|
43
43
|
attr_accessor :sign_out_path_name
|
44
44
|
attr_accessor :resources
|
45
|
+
attr_accessor :prefix_path
|
45
46
|
attr_writer :branding
|
46
47
|
|
47
48
|
def initialize
|
@@ -94,6 +95,7 @@ module Avo
|
|
94
95
|
@authorization_client = :pundit
|
95
96
|
@field_wrapper_layout = :inline
|
96
97
|
@resources = nil
|
98
|
+
@prefix_path = nil
|
97
99
|
end
|
98
100
|
|
99
101
|
def current_user_method(&block)
|
@@ -117,8 +119,8 @@ module Avo
|
|
117
119
|
end
|
118
120
|
|
119
121
|
def namespace
|
120
|
-
if
|
121
|
-
|
122
|
+
if Avo.configuration.root_path.present?
|
123
|
+
Avo.configuration.root_path.delete "/"
|
122
124
|
else
|
123
125
|
root_path.delete "/"
|
124
126
|
end
|
@@ -130,10 +132,6 @@ module Avo
|
|
130
132
|
@root_path
|
131
133
|
end
|
132
134
|
|
133
|
-
def computed_root_path
|
134
|
-
Avo.configuration.root_path
|
135
|
-
end
|
136
|
-
|
137
135
|
def feature_enabled?(feature)
|
138
136
|
!@disabled_features.map(&:to_sym).include?(feature.to_sym)
|
139
137
|
end
|
data/lib/avo/version.rb
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
Avo.configure do |config|
|
3
3
|
## == Routing ==
|
4
4
|
config.root_path = '/<%= options[:path] %>'
|
5
|
+
# used only when you have custom `map` configuration in your config.ru
|
6
|
+
# config.prefix_path = "/internal"
|
5
7
|
|
6
8
|
# Where should the user be redirected when visting the `/<%= options[:path] %>` url
|
7
9
|
# config.home_path = nil
|