avo 2.28.2.pre.pr1642 → 2.28.3.pre.pr1646
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/Gemfile.lock +1 -1
- data/app/components/avo/fields/common/single_file_viewer_component.html.erb +0 -1
- data/app/helpers/avo/application_helper.rb +6 -5
- data/app/views/layouts/avo/application.html.erb +0 -1
- data/lib/avo/configuration.rb +6 -4
- data/lib/avo/version.rb +1 -1
- data/lib/generators/avo/templates/initializer/avo.tt +0 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 527b4a8adeef6e5f6833c8329a66e2c5ced407a38f78956c4927f42af9967e93
|
|
4
|
+
data.tar.gz: e90ddb57665013a527f4cf1fe815578e3126af4b1225f96687b37386131cb9c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab734f7daa2221975ef03005c5b7a94e75db330055de4e90efc540d91e2d9816ee3c89013f13b7d195010df224569849f449e3460010991ed1ec59c1a5bdabb6
|
|
7
|
+
data.tar.gz: a6b2a63cfdba2692203888b799c4e3c12414ece3cfc5017ce26a2dc453477c7e0f3d3065780add4232af92343915e3a8d98faa65f9ae07b4b5ab45d40d74360a
|
data/Gemfile.lock
CHANGED
|
@@ -102,15 +102,16 @@ module Avo
|
|
|
102
102
|
end
|
|
103
103
|
|
|
104
104
|
def root_path_without_url
|
|
105
|
-
|
|
105
|
+
Avo::App.root_path
|
|
106
|
+
.to_s
|
|
107
|
+
.delete_prefix(request.base_url.to_s)
|
|
108
|
+
.delete_suffix("/")
|
|
109
|
+
.gsub("/?", "?")
|
|
110
|
+
.query = ""
|
|
106
111
|
rescue
|
|
107
112
|
Avo.configuration.root_path
|
|
108
113
|
end
|
|
109
114
|
|
|
110
|
-
def mount_path
|
|
111
|
-
Avo::Engine.routes.find_script_name(params.permit!.to_h.symbolize_keys)
|
|
112
|
-
end
|
|
113
|
-
|
|
114
115
|
private
|
|
115
116
|
|
|
116
117
|
# Taken from the original library
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
</div>
|
|
47
47
|
<%= turbo_frame_tag 'actions_show' %>
|
|
48
48
|
<%= turbo_frame_tag 'attach_modal' %>
|
|
49
|
-
<%= turbo_frame_tag 'destroy_attachment_form' %>
|
|
50
49
|
<%= turbo_frame_tag 'alerts', class: "fixed inset-0 bottom-0 flex flex-col space-y-4 items-end justify-right px-4 py-6 sm:p-6 justify-end z-[100] pointer-events-none" do %>
|
|
51
50
|
<%= render Avo::FlashAlertsComponent.new flashes: flash %>
|
|
52
51
|
<% # In case we have other general error messages %>
|
data/lib/avo/configuration.rb
CHANGED
|
@@ -42,7 +42,6 @@ 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
|
|
46
45
|
attr_writer :branding
|
|
47
46
|
|
|
48
47
|
def initialize
|
|
@@ -95,7 +94,6 @@ module Avo
|
|
|
95
94
|
@authorization_client = :pundit
|
|
96
95
|
@field_wrapper_layout = :inline
|
|
97
96
|
@resources = nil
|
|
98
|
-
@prefix_path = nil
|
|
99
97
|
end
|
|
100
98
|
|
|
101
99
|
def current_user_method(&block)
|
|
@@ -119,8 +117,8 @@ module Avo
|
|
|
119
117
|
end
|
|
120
118
|
|
|
121
119
|
def namespace
|
|
122
|
-
if
|
|
123
|
-
|
|
120
|
+
if computed_root_path.present?
|
|
121
|
+
computed_root_path.delete "/"
|
|
124
122
|
else
|
|
125
123
|
root_path.delete "/"
|
|
126
124
|
end
|
|
@@ -132,6 +130,10 @@ module Avo
|
|
|
132
130
|
@root_path
|
|
133
131
|
end
|
|
134
132
|
|
|
133
|
+
def computed_root_path
|
|
134
|
+
Avo.configuration.root_path
|
|
135
|
+
end
|
|
136
|
+
|
|
135
137
|
def feature_enabled?(feature)
|
|
136
138
|
!@disabled_features.map(&:to_sym).include?(feature.to_sym)
|
|
137
139
|
end
|
data/lib/avo/version.rb
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
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"
|
|
7
5
|
|
|
8
6
|
# Where should the user be redirected when visting the `/<%= options[:path] %>` url
|
|
9
7
|
# config.home_path = nil
|