activeadmin 3.5.0 → 3.5.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/CHANGELOG.md +14 -0
- data/app/assets/javascripts/active_admin/base.js +3 -1
- data/app/javascript/active_admin/lib/modal-dialog.js +1 -1
- data/lib/active_admin/resource_controller/data_access.rb +8 -3
- data/lib/active_admin/router.rb +1 -1
- data/lib/active_admin/version.rb +1 -1
- 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: be95e31901e8d39cce8d91294688462aab2b0de748a1e42ab78225a80cf3691c
|
|
4
|
+
data.tar.gz: 627f265f8ff2cafbae08e8e620e6a838c724c60bb3ac1d25327485587cade73f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a4382f75f12aa918e5a027e9f56244b9b957fc1efcce1b20faae4005406c90f328857d96ba828a9b5b4f55e364d31a529fcb8c626eeece5a95b7458eab6a795
|
|
7
|
+
data.tar.gz: 8f52969b691a64f6ebe7a8401fe8a5f39fc3cb745bd73b5754f6071583fd450a9d2cd4568cc64f7ae51aa536eba10e57173dffbb9c1d554137cf7d423a3ac9db
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 3.5.2 [☰](https://github.com/activeadmin/activeadmin/compare/v3.5.1..v3.5.2)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* Backport run update_resource inside a transaction to avoid autosaving relationships through assign_attributes when the record is invalid [#9064] by [@mgrunberg] and [@deivid-rodriguez]
|
|
10
|
+
|
|
11
|
+
## 3.5.1 [☰](https://github.com/activeadmin/activeadmin/compare/v3.5.0..v3.5.1)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* Fix UI issue in modal dialog [#8978] by @tagliala
|
|
16
|
+
|
|
5
17
|
## 3.5.0 [☰](https://github.com/activeadmin/activeadmin/compare/v3.4.0..v3.5.0)
|
|
6
18
|
|
|
7
19
|
### Enhancements
|
|
@@ -1003,6 +1015,8 @@ Please check [0-6-stable] for previous changes.
|
|
|
1003
1015
|
[#8837]: https://github.com/activeadmin/activeadmin/pull/8837
|
|
1004
1016
|
[#8964]: https://github.com/activeadmin/activeadmin/pull/8964
|
|
1005
1017
|
[#8965]: https://github.com/activeadmin/activeadmin/pull/8965
|
|
1018
|
+
[#8978]: https://github.com/activeadmin/activeadmin/pull/8978
|
|
1019
|
+
[#9064]: https://github.com/activeadmin/activeadmin/pull/9064
|
|
1006
1020
|
|
|
1007
1021
|
[@1000ship]: https://github.com/1000ship
|
|
1008
1022
|
[@5t111111]: https://github.com/5t111111
|
|
@@ -69,7 +69,9 @@
|
|
|
69
69
|
open: function open(_event, _ui) {
|
|
70
70
|
$("body").trigger("modal_dialog:after_open", [ form ]);
|
|
71
71
|
},
|
|
72
|
-
|
|
72
|
+
classes: {
|
|
73
|
+
"ui-dialog": "active_admin_dialog"
|
|
74
|
+
},
|
|
73
75
|
buttons: {
|
|
74
76
|
OK: function OK() {
|
|
75
77
|
callback($(this).serializeObject());
|
|
@@ -47,7 +47,7 @@ function ModalDialog(message, inputs, callback){
|
|
|
47
47
|
open(_event, _ui) {
|
|
48
48
|
$('body').trigger('modal_dialog:after_open', [form]);
|
|
49
49
|
},
|
|
50
|
-
|
|
50
|
+
classes: { 'ui-dialog': 'active_admin_dialog' },
|
|
51
51
|
buttons: {
|
|
52
52
|
OK() {
|
|
53
53
|
callback($(this).serializeObject());
|
|
@@ -168,11 +168,16 @@ module ActiveAdmin
|
|
|
168
168
|
#
|
|
169
169
|
# @return [void]
|
|
170
170
|
def update_resource(object, attributes)
|
|
171
|
-
|
|
171
|
+
status = nil
|
|
172
|
+
ActiveRecord::Base.transaction do
|
|
173
|
+
object = assign_attributes(object, attributes)
|
|
172
174
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
+
run_update_callbacks object do
|
|
176
|
+
status = save_resource(object)
|
|
177
|
+
raise ActiveRecord::Rollback unless status
|
|
178
|
+
end
|
|
175
179
|
end
|
|
180
|
+
status
|
|
176
181
|
end
|
|
177
182
|
|
|
178
183
|
# Destroys an object from the database and calls appropriate callbacks.
|
data/lib/active_admin/router.rb
CHANGED
|
@@ -68,7 +68,7 @@ module ActiveAdmin
|
|
|
68
68
|
router.get "/#{page}", to: "#{page}#index"
|
|
69
69
|
config.page_actions.each do |action|
|
|
70
70
|
Array.wrap(action.http_verb).each do |verb|
|
|
71
|
-
build_route(verb, "/#{page}/#{action.name}"
|
|
71
|
+
build_route(verb, "/#{page}/#{action.name}", to: "#{page}##{action.name}")
|
|
72
72
|
end
|
|
73
73
|
end
|
|
74
74
|
end
|
data/lib/active_admin/version.rb
CHANGED