active_scaffold_batch 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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57996a4d8d4924a4d1dd7bea60e270cc86906312e3b98a806425e4b0742f248e
|
4
|
+
data.tar.gz: acb26347253ee5fa7f8babd740de40897ce9d8673f6c004aa36c8536459f85ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b70ebd0b00056a6ad2a6432d179efa852deb037dd271c492bee28fc982743779d0a2df0d5e3cf5bded88aa7e6d5a5412a227a4829e5909052e99d90a3105db5a
|
7
|
+
data.tar.gz: ae11b116e3bd9195797bb0e00d57911c51433b329c7b7af3d58e902fc05955c2bda96d288fef118f722204ca13a9d4e041bf7b2dd759f13b6b86ae87317a6fea
|
@@ -199,7 +199,9 @@ module ActiveScaffold::Actions
|
|
199
199
|
if successful?
|
200
200
|
marked_records_parent.delete(created_by.id.to_s) if batch_scope == 'MARKED' && marked_records_parent
|
201
201
|
elsif @record.errors[batch_create_by_column]
|
202
|
-
@record.errors.messages[batch_create_by_column].map
|
202
|
+
new_errors = @record.errors.messages[batch_create_by_column].map { |e| "#{@record.send(batch_create_by_column)} #{e}" }
|
203
|
+
@record.errors.delete(batch_create_by_column)
|
204
|
+
new_errors.each { |error| @record.errors.add batch_create_by_column, error }
|
203
205
|
end
|
204
206
|
error_records << @record unless successful? && !run_in_transaction?
|
205
207
|
end
|
@@ -1,21 +1,21 @@
|
|
1
1
|
module ActiveScaffoldBatch
|
2
2
|
class Engine < ::Rails::Engine
|
3
|
-
initializer
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
self::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_destroy] = :delete
|
16
|
-
end
|
3
|
+
initializer 'active_scaffold_batch.routes' do
|
4
|
+
ActiveSupport.on_load :active_scaffold_routing do
|
5
|
+
self::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_edit] = :get
|
6
|
+
self::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_update] = :post
|
7
|
+
self::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_new] = :get
|
8
|
+
self::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_create] = :post
|
9
|
+
self::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_add] = :get
|
10
|
+
#not working because routing picks show route instead
|
11
|
+
#self::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_destroy] = :get
|
12
|
+
#you may define a route for your controller before resource routes
|
13
|
+
#match 'players/batch_destroy' => 'players#batch_destroy', :via => [:get]
|
14
|
+
self::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_destroy] = :delete
|
17
15
|
end
|
16
|
+
end
|
18
17
|
|
18
|
+
initializer("active_scaffold_batch.view") do
|
19
19
|
ActiveSupport.on_load(:action_view) do
|
20
20
|
begin
|
21
21
|
include ActiveScaffold::Helpers::UpdateColumnHelpers
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_scaffold_batch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Cambra
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-08-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: active_scaffold
|