activeadmin_favorites 0.2.0 → 0.2.1
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: 37a27b5b9d1e277fcbacdbe9005a95d048006c4952abde9a728df93910533ce8
|
|
4
|
+
data.tar.gz: 5cb91e4302c471b65df212fef3bb06ddfb2df077f72f591973d8ab42c67b71da
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0f306c9a5f2b69c2b885e2e227cb2e306ea4a293f3198f4e1f408c739e66371d4e8a11cb0027af9dc5efaef4b37d63ba788b0559640b95bab1c7d926b02c508c
|
|
7
|
+
data.tar.gz: 4abaa5e29d28f6db5724fa268c235e192915deea3b4248a038df7c167b3345fed22090f7dc8b3c840731133699af556bd22bb14074e60eb92356a4aced4c00aa
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 0.2.1 (2026-11-23)
|
|
4
|
+
|
|
5
|
+
- Pin Favorites Stimulus controllers only on the Active Admin import map so application pages do not publish those module keys.
|
|
6
|
+
- On Favorites create without a prefilled destination, show editable path and resource fields so the form can be completed and saved.
|
|
7
|
+
- CI: refresh lockfiles for current advisories (`graphql` 2.6.16, `puma` 8.1.2) and raise the graphql development floor.
|
|
8
|
+
- CI: allowlist empty `ransackable_associations` on the dummy Article model for Ransack 6 on appraisal Gemfiles.
|
|
9
|
+
|
|
3
10
|
## 0.2.0 (2026-11-16)
|
|
4
11
|
|
|
5
12
|
- Expose Favorites as GraphQL type `Favorite` when GraphQL is enabled on the admin namespace.
|
|
@@ -53,7 +53,7 @@ Gem::Specification.new do |spec|
|
|
|
53
53
|
spec.add_development_dependency "capybara", "~> 3.40"
|
|
54
54
|
spec.add_development_dependency "capybara-playwright-driver", "~> 0.5"
|
|
55
55
|
spec.add_development_dependency "factory_bot", "~> 6"
|
|
56
|
-
spec.add_development_dependency "graphql", ">= 2.6.
|
|
56
|
+
spec.add_development_dependency "graphql", ">= 2.6.16", "< 3"
|
|
57
57
|
spec.add_development_dependency "polyrun", ">= 2.2.9"
|
|
58
58
|
spec.add_development_dependency "prosopite", "~> 2.0"
|
|
59
59
|
spec.add_development_dependency "puma", ">= 5.0"
|
|
@@ -35,18 +35,16 @@ module ActiveAdmin
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
initializer "activeadmin_favorites.importmap", after: :importmap do
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
next unless defined?(ActiveAdmin) && ActiveAdmin.respond_to?(:importmap)
|
|
39
|
+
|
|
40
|
+
ActiveAdmin.importmap.draw do
|
|
41
|
+
pin "controllers/activeadmin_favorites/personalization_controller",
|
|
40
42
|
to: "activeadmin_favorites/personalization_controller.js"
|
|
41
|
-
|
|
43
|
+
pin "controllers/activeadmin_favorites/filter_favorite_controller",
|
|
42
44
|
to: "activeadmin_favorites/filter_favorite_controller.js"
|
|
43
|
-
|
|
45
|
+
pin "controllers/activeadmin_favorites/macro_fields_controller",
|
|
44
46
|
to: "activeadmin_favorites/macro_fields_controller.js"
|
|
45
47
|
end
|
|
46
|
-
|
|
47
|
-
application_importmap = Rails.application.importmap if Rails.application.respond_to?(:importmap)
|
|
48
|
-
application_importmap&.draw(&pin_controller)
|
|
49
|
-
ActiveAdmin.importmap.draw(&pin_controller) if defined?(ActiveAdmin) && ActiveAdmin.respond_to?(:importmap)
|
|
50
48
|
end
|
|
51
49
|
|
|
52
50
|
initializer "activeadmin_favorites.i18n" do
|
|
@@ -105,7 +105,7 @@ module ActiveAdmin
|
|
|
105
105
|
apply_layout_from_params(resource)
|
|
106
106
|
|
|
107
107
|
if resource.errors.any? || !resource.save
|
|
108
|
-
render :new, status: :
|
|
108
|
+
render :new, status: :unprocessable_content
|
|
109
109
|
else
|
|
110
110
|
redirect_to admin_favorites_path(kind: resource.kind), notice: create_notice_for(resource)
|
|
111
111
|
end
|
|
@@ -122,7 +122,7 @@ module ActiveAdmin
|
|
|
122
122
|
apply_layout_from_params(resource)
|
|
123
123
|
|
|
124
124
|
if resource.errors.any? || !resource.save
|
|
125
|
-
render :edit, status: :
|
|
125
|
+
render :edit, status: :unprocessable_content
|
|
126
126
|
else
|
|
127
127
|
redirect_to admin_favorites_path(kind: resource.kind), notice: I18n.t("active_admin.favorites.updated")
|
|
128
128
|
end
|
|
@@ -294,9 +294,15 @@ module ActiveAdmin
|
|
|
294
294
|
required: false,
|
|
295
295
|
label: I18n.t("active_admin.favorites.published")
|
|
296
296
|
if f.object.new_record?
|
|
297
|
-
f.
|
|
298
|
-
|
|
299
|
-
|
|
297
|
+
if f.object.path.present? && f.object.resource_key.present?
|
|
298
|
+
f.input :path, as: :hidden
|
|
299
|
+
f.input :query_string, as: :hidden
|
|
300
|
+
f.input :resource_key, as: :hidden
|
|
301
|
+
else
|
|
302
|
+
f.input :path
|
|
303
|
+
f.input :query_string, required: false
|
|
304
|
+
f.input :resource_key
|
|
305
|
+
end
|
|
300
306
|
f.input :kind, as: :hidden
|
|
301
307
|
f.input :action, as: :hidden
|
|
302
308
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activeadmin_favorites
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrei Makarov
|
|
@@ -161,7 +161,7 @@ dependencies:
|
|
|
161
161
|
requirements:
|
|
162
162
|
- - ">="
|
|
163
163
|
- !ruby/object:Gem::Version
|
|
164
|
-
version: 2.6.
|
|
164
|
+
version: 2.6.16
|
|
165
165
|
- - "<"
|
|
166
166
|
- !ruby/object:Gem::Version
|
|
167
167
|
version: '3'
|
|
@@ -171,7 +171,7 @@ dependencies:
|
|
|
171
171
|
requirements:
|
|
172
172
|
- - ">="
|
|
173
173
|
- !ruby/object:Gem::Version
|
|
174
|
-
version: 2.6.
|
|
174
|
+
version: 2.6.16
|
|
175
175
|
- - "<"
|
|
176
176
|
- !ruby/object:Gem::Version
|
|
177
177
|
version: '3'
|