activeadmin 3.5.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11f17bd91f5f20e866dc189cbf0f191e5fbdf2ad192c00db190ca3538f852dd1
4
- data.tar.gz: 816caf26faae1c3b204266d2b8ec6e4b80ee23efffe75657baa52ccadb60c383
3
+ metadata.gz: be95e31901e8d39cce8d91294688462aab2b0de748a1e42ab78225a80cf3691c
4
+ data.tar.gz: 627f265f8ff2cafbae08e8e620e6a838c724c60bb3ac1d25327485587cade73f
5
5
  SHA512:
6
- metadata.gz: 45b21c4efe22df18b7a6a937973bc80280147311cd6ef8b4eed2e2ead031505bbe5418933952c8ca1d72c1d6f6cb99ad0012447cd08c8a86ff8f86680b136904
7
- data.tar.gz: d516429f775372f7e55be58d9dcd6093b6be85a79f9c0de3819b3a5b41acb3adce80f788687655b05dd69f44d35ce695d06496a8a7b2a1f708e6dec3261649b3
6
+ metadata.gz: 7a4382f75f12aa918e5a027e9f56244b9b957fc1efcce1b20faae4005406c90f328857d96ba828a9b5b4f55e364d31a529fcb8c626eeece5a95b7458eab6a795
7
+ data.tar.gz: 8f52969b691a64f6ebe7a8401fe8a5f39fc3cb745bd73b5754f6071583fd450a9d2cd4568cc64f7ae51aa536eba10e57173dffbb9c1d554137cf7d423a3ac9db
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
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
+
5
11
  ## 3.5.1 [☰](https://github.com/activeadmin/activeadmin/compare/v3.5.0..v3.5.1)
6
12
 
7
13
  ### Bug Fixes
@@ -1010,6 +1016,7 @@ Please check [0-6-stable] for previous changes.
1010
1016
  [#8964]: https://github.com/activeadmin/activeadmin/pull/8964
1011
1017
  [#8965]: https://github.com/activeadmin/activeadmin/pull/8965
1012
1018
  [#8978]: https://github.com/activeadmin/activeadmin/pull/8978
1019
+ [#9064]: https://github.com/activeadmin/activeadmin/pull/9064
1013
1020
 
1014
1021
  [@1000ship]: https://github.com/1000ship
1015
1022
  [@5t111111]: https://github.com/5t111111
@@ -168,11 +168,16 @@ module ActiveAdmin
168
168
  #
169
169
  # @return [void]
170
170
  def update_resource(object, attributes)
171
- object = assign_attributes(object, attributes)
171
+ status = nil
172
+ ActiveRecord::Base.transaction do
173
+ object = assign_attributes(object, attributes)
172
174
 
173
- run_update_callbacks object do
174
- save_resource(object)
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.
@@ -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}" => "#{page}##{action.name}")
71
+ build_route(verb, "/#{page}/#{action.name}", to: "#{page}##{action.name}")
72
72
  end
73
73
  end
74
74
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ActiveAdmin
3
- VERSION = "3.5.1"
3
+ VERSION = "3.5.2"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 3.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Maresh
@@ -527,7 +527,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
527
527
  - !ruby/object:Gem::Version
528
528
  version: '0'
529
529
  requirements: []
530
- rubygems_version: 4.0.6
530
+ rubygems_version: 3.6.9
531
531
  specification_version: 4
532
532
  summary: Active Admin is a Ruby on Rails plugin for generating administration style
533
533
  interfaces. It abstracts common business application patterns to make it simple