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 +4 -4
- data/lib/dynamic_scaffold/controller.rb +3 -1
- data/lib/dynamic_scaffold/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76369253caa437f8e867900e860b295055e087c9a305215239ef1d70e40e22b8
|
4
|
+
data.tar.gz: 957625148912b7291c7ad8fe0af232c291eb42a369ac32b6c2d54f5c1c4e8170
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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)
|
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.
|
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-
|
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
|