dynamic_scaffold 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2cc7a47fdf21680556c682f4e595861cbe3a3d8791328fffa7035cd0a171d7fa
4
- data.tar.gz: ebcfd2e48af4267a087df753ebe571112d84c3c3702fe0fd7a66cec4a36e111a
3
+ metadata.gz: 76369253caa437f8e867900e860b295055e087c9a305215239ef1d70e40e22b8
4
+ data.tar.gz: 957625148912b7291c7ad8fe0af232c291eb42a369ac32b6c2d54f5c1c4e8170
5
5
  SHA512:
6
- metadata.gz: 2cd01e3b4e60bf76c3dfc8f3fa54f37c774a50eeeeaf1661ed31ab4b2af408029b33b5844fc458ae743d0429b5a0b843f00d436ce07b584445030f98c225d833
7
- data.tar.gz: 357e00ab95e8522d7f6628182ef62c3cdf1e0842f30f42fbd5c30081654abaf109793f12d5578018168b5706a957b8631be1dfc472e33dc3d8f5548305d83606
6
+ metadata.gz: d544f44c76007716567503200dfb66fa33311ff73aad7db0482a70746b4889f54bb3c016ac9ed04d850fa881e32f8afd098b9d2f3c5b3fb182a67d2acec556b8
7
+ data.tar.gz: 2dbd1c064951d4217cca523a93be7575a4b39f159d2d057151dfbca9dbb5a33a5bd9bebc2749588db8d69e0be2d03045905a53144e20b10a1d9573afc1257bc2
@@ -97,6 +97,7 @@ module DynamicScaffold
97
97
  record = find_record(dynamic_scaffold.model.primary_key => params['id'])
98
98
  begin
99
99
  dynamic_scaffold.model.transaction do
100
+ yield(record) if block_given?
100
101
  record.destroy
101
102
  end
102
103
  rescue ::ActiveRecord::InvalidForeignKey => e
@@ -117,7 +118,8 @@ module DynamicScaffold
117
118
  rec = find_record(pkeys.to_hash)
118
119
  next_sec = next_sequence!
119
120
  rec[dynamic_scaffold.list.sorter_attribute] = next_sec
120
- rec.save
121
+ yield(rec) if block_given?
122
+ rec.save!
121
123
  end
122
124
  end
123
125
  redirect_to dynamic_scaffold_path(:index, request_queries)
@@ -1,3 +1,3 @@
1
1
  module DynamicScaffold
2
- VERSION = '1.3.0'.freeze
2
+ VERSION = '1.4.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masamoto Miyata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-23 00:00:00.000000000 Z
11
+ date: 2020-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: classnames-rails-view