easy-admin-rails 0.2.2 → 0.2.4
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 200c3fe21e8f5566d71ebdb3a33e3323f13a306b854d3b40eb1b0ae49967b7d5
|
4
|
+
data.tar.gz: be99b25d0ae753a87e3d3c8a1c660d4ee03174080f5aa80139c52650ea538353
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb4f2033bc990a07e5b92a93823637841b8de9b1c7bbfc7341ef626efbb483235aafbae6c0ebae6aec545f7172a41177ef6dd064d8ead0355b23f83663e77ff5
|
7
|
+
data.tar.gz: 158d1b41f51cd695ad7c034eae47e847a910a9eacb70c7f51a8260067f01d6732cb56547ccce545f01547b5dc4b3b7855bebc7462980ee12800a3a35abdfd9b7
|
@@ -110,11 +110,16 @@ module EasyAdmin
|
|
110
110
|
|
111
111
|
respond_to do |format|
|
112
112
|
format.html do
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
113
|
+
# Check if this is a turbo_frame request (like inline editing)
|
114
|
+
if turbo_frame_request?
|
115
|
+
render template: 'easy_admin/application/authorization_failure', layout: false
|
116
|
+
else
|
117
|
+
flash[:alert] = error_message
|
118
|
+
|
119
|
+
# Try to redirect back, fallback to dashboard
|
120
|
+
redirect_path = request.referer&.start_with?(request.base_url) ? request.referer : easy_admin.root_path
|
121
|
+
redirect_to redirect_path
|
122
|
+
end
|
118
123
|
end
|
119
124
|
|
120
125
|
format.turbo_stream do
|
data/lib/easy_admin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy-admin-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Slaurmagan
|
@@ -355,6 +355,7 @@ files:
|
|
355
355
|
- app/models/easy_admin/application_record.rb
|
356
356
|
- app/policies/admin_user_policy.rb
|
357
357
|
- app/policies/application_policy.rb
|
358
|
+
- app/views/easy_admin/application/authorization_failure.html.erb
|
358
359
|
- app/views/easy_admin/application/authorization_failure.turbo_stream.erb
|
359
360
|
- app/views/easy_admin/dashboard/index.html.erb
|
360
361
|
- app/views/easy_admin/dashboards/card.html.erb
|
@@ -454,12 +455,12 @@ files:
|
|
454
455
|
- lib/generators/easy_admin/templates/easy_admin.rb
|
455
456
|
- lib/generators/easy_admin/templates/resource.rb
|
456
457
|
- lib/tasks/easy_admin_tasks.rake
|
457
|
-
homepage: https://github.com/
|
458
|
+
homepage: https://github.com/Slaurmagan/easy-admin
|
458
459
|
licenses:
|
459
460
|
- MIT
|
460
461
|
metadata:
|
461
462
|
allowed_push_host: https://rubygems.org
|
462
|
-
homepage_uri: https://github.com/
|
463
|
+
homepage_uri: https://github.com/Slaurmagan/easy-admin
|
463
464
|
source_code_uri: https://github.com/Slaurmagan/easy-admin
|
464
465
|
changelog_uri: https://github.com/Slaurmagan/easy-admin/blob/main/CHANGELOG.md
|
465
466
|
post_install_message:
|