active_scaffold_batch 3.3.0 → 3.3.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.
@@ -132,7 +132,7 @@ module ActiveScaffold::Actions
|
|
132
132
|
active_scaffold_config.model.transaction do
|
133
133
|
processed_records, created_records = yield
|
134
134
|
if processed_records == created_records
|
135
|
-
@error_records.each { |
|
135
|
+
@error_records.each { |key, record| create_save(record || key) } if validate_first?
|
136
136
|
@error_records = []
|
137
137
|
else
|
138
138
|
created_records = 0
|
@@ -190,7 +190,12 @@ module ActiveScaffold::Actions
|
|
190
190
|
end
|
191
191
|
|
192
192
|
if authorized_for_job?(@record)
|
193
|
-
|
193
|
+
if validate_first?
|
194
|
+
self.successful = [@record.valid?, @record.associated_valid?].all?
|
195
|
+
else
|
196
|
+
create_save(@record) rescue nil
|
197
|
+
self.successful = @record.persisted?
|
198
|
+
end
|
194
199
|
if successful?
|
195
200
|
marked_records_parent.delete(created_by.id.to_s) if batch_scope == 'MARKED' && marked_records_parent
|
196
201
|
end
|
@@ -219,7 +224,7 @@ module ActiveScaffold::Actions
|
|
219
224
|
if column.association
|
220
225
|
column_plural_assocation_value_from_value(column, value)
|
221
226
|
else
|
222
|
-
value.split
|
227
|
+
value.split
|
223
228
|
end
|
224
229
|
end
|
225
230
|
|
@@ -67,7 +67,7 @@ module ActiveScaffold::Config
|
|
67
67
|
attr_accessor :layout
|
68
68
|
|
69
69
|
def action_group
|
70
|
-
@action_group || (default_batch_by_column ? 'collection.
|
70
|
+
@action_group || (default_batch_by_column ? 'collection.batch' : 'collection')
|
71
71
|
end
|
72
72
|
|
73
73
|
# the label= method already exists in the Form base class
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_scaffold_batch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 3.3.
|
9
|
+
- 1
|
10
|
+
version: 3.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sergio Cambra
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2014-09-
|
19
|
+
date: 2014-09-24 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
type: :runtime
|