active_scaffold_batch 3.3.3 → 3.3.4

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,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NWUzOTlhODJiNzVmMmMzMjkzZTM0Yjk0ZDA1Mjg5YTU5MTYyNjU4ZQ==
5
- data.tar.gz: !binary |-
6
- YjQwZDExNjM2YjhmZDZkMjM0Y2Q2ZDdkNzdiMTc5YzQ0ZDU2MGVjMg==
2
+ SHA1:
3
+ metadata.gz: 315bc6bae86fcc614c4d42ec9281c4e77b04bf03
4
+ data.tar.gz: d68dcac19cb8e728015cc8307c4c4326180cb334
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YWNkOGRmNzMxNDQ2MTMyOTQ4MjU5OTRlMzU1MTFiZDJkOWY2ZDRlMDk0ZmMw
10
- MzZmNTY1Y2RlZTg2MDAyMjBjODQ1ZWQ5OTlmZDU2MzU5NzE4MzQxZjEzNDNj
11
- YzZlMThiNDk0YjUzNzQzYzI2NTA1MGEzNTdlNzFmZDY4ZGM1ZjM=
12
- data.tar.gz: !binary |-
13
- ZjEzNDU2NTAwMWEwODQxZGUzZjMzZWI1ODM4NTZmM2UyZDBkNjQxNGQyYTk1
14
- ZTE3MzYxZDc4Mjc2ODc3ODJjZmRiYmFmMDY2ODhmNjRmMjZmYTc4MDA4MGVk
15
- NDk0MTQ5ZmJjMWE0OTY4ZmE4YzNhYzI3MDNiMTUyMDkzZmFiY2I=
6
+ metadata.gz: 2848273ba0912eefc100f95c16862f672fe1d6a665b24981b2fed40689a4146031113397cf1466b63624d4a619dba6f1af8c204f5f891063c54ecfce7e24b286
7
+ data.tar.gz: 7ccca54e85cfcf4be69da73449721ce730bc6228e75775de035a2e5b22f5faa899c1e0fc178abef759db978a6a704b3c2f849d263d979735650f372b2bacbb96
@@ -23,7 +23,7 @@ module ActiveScaffold::Actions
23
23
  batch_action
24
24
  end
25
25
 
26
-
26
+
27
27
  protected
28
28
  def batch_new_respond_to_html
29
29
  if batch_successful?
@@ -211,12 +211,14 @@ module ActiveScaffold::Actions
211
211
 
212
212
  def create_attribute_values_from_params(columns, attributes)
213
213
  values = {}
214
+ parent_record = active_scaffold_config.model.new
214
215
  columns.each :for => active_scaffold_config.model, :crud_type => :create, :flatten => true do |column|
215
216
  next unless attributes.has_key?(column.name)
216
217
  if column == batch_create_by_column.to_sym
217
218
  @batch_create_by_records = batch_values_for_column(column, attributes[column.name])
218
219
  else
219
- values[column.name] = {:column => column, :value => column_value_from_param_value(nil, column, attributes[column.name])}
220
+ value = column_value_from_param_value(parent_record, column, attributes[column.name])
221
+ values[column.name] = {:column => column, :value => value}
220
222
  end
221
223
  end
222
224
  values
@@ -25,7 +25,7 @@ module ActiveScaffold
25
25
  options.update(column.options)
26
26
  html_options[:name] = "#{html_options[:name]}[]"
27
27
  html_options[:multiple] = true
28
- select_tag(column.name, options_for_select(select_options.uniq, associated_options), html_options)
28
+ select_tag(column.name, options_from_collection_for_select(select_options.uniq, :id, column.options[:label_method] || :to_label, associated_options), html_options)
29
29
  end
30
30
 
31
31
  def batch_create_multiple_remove_link
@@ -2,7 +2,7 @@ module ActiveScaffoldBatch
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 3
5
- PATCH = 3
5
+ PATCH = 4
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
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.3.3
4
+ version: 3.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio Cambra
@@ -9,20 +9,20 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-23 00:00:00.000000000 Z
12
+ date: 2016-04-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: active_scaffold
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ! '>='
18
+ - - '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: 3.4.18
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ! '>='
25
+ - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: 3.4.18
28
28
  description: You want to destroy/update many records at once with activescaffold?
@@ -86,17 +86,17 @@ require_paths:
86
86
  - lib
87
87
  required_ruby_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ! '>='
89
+ - - '>='
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 2.4.4
99
+ rubygems_version: 2.4.8
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: Batch Processing for ActiveScaffold