active_scaffold_batch_vho 3.1.6 → 3.1.7

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
  SHA1:
3
- metadata.gz: 181d2cd5fdea04017efbcc9ec17a234d9bb4e82e
4
- data.tar.gz: 8584c984a7674d4299c4024ba5bc109e9002c30d
3
+ metadata.gz: a66999a2be3f590bc571e1b8c8c71ab1c556c427
4
+ data.tar.gz: fb6732ab36ee38d03396186c1c633cf927841f0b
5
5
  SHA512:
6
- metadata.gz: d032fb97482b555c69e25cf21d9bdb57e04483c4681968e6ca525a9809ea809f2f2bf66ff50f676ce655ed55e4d11527d1a69e7193723729bca21c9ebd438f58
7
- data.tar.gz: d40597d712e2af7ab1a745d1211676d64b87aaf40469357d962b4b01f983d96f312ac70b06b3d7923994f5777e7bd397b7aa6d2d6d21b1561c43df2d28b644a1
6
+ metadata.gz: f6428a4a72ae0d165e034c655aa74211ff4b07015d14c3879de3248416152e87c51bcd6b2f21b22839d1282fc1735ddf9a6c2f3daea8623e4efefdd99e5dffa1
7
+ data.tar.gz: 26ab92fbd91de06abddfb8920c71d2d69914d5d03a9cce620b1faf9ca3e537d7ee4c5c17be4bf7387b52d33f5b97f5184dca8939bf9dfc6aa4e262ee4202bacf
@@ -85,7 +85,7 @@ module ActiveScaffold::Actions
85
85
 
86
86
  def before_do_batch_create
87
87
  create_columns = active_scaffold_config.batch_create.columns
88
- @batch_create_values = attribute_values_from_params(create_columns, params[:record])
88
+ @batch_create_values = batch_create_attribute_values_from_params(create_columns, params[:record])
89
89
  end
90
90
 
91
91
  # in case of an error we have to prepare @record object to have assigned all
@@ -95,7 +95,7 @@ module ActiveScaffold::Actions
95
95
  do_new
96
96
  batch_create_values.each do |attribute, value|
97
97
  form_ui = colunm_form_ui(value[:column])
98
- set_record_attribute(value[:column], attribute, value[:value]) unless form_ui && override_batch_create_value?(form_ui)
98
+ batch_create_set_record_attribute(value[:column], attribute, value[:value]) unless form_ui && override_batch_create_value?(form_ui)
99
99
  end
100
100
  end
101
101
 
@@ -130,7 +130,7 @@ module ActiveScaffold::Actions
130
130
  unless @record.nil?
131
131
  @record.send("#{batch_create_by_column.to_s}=", created_by)
132
132
  batch_create_values.each do |attribute, value|
133
- set_record_attribute(value[:column], attribute, value[:value])
133
+ batch_create_set_record_attribute(value[:column], attribute, value[:value])
134
134
  end
135
135
 
136
136
  if authorized_for_job?(@record)
@@ -148,7 +148,7 @@ module ActiveScaffold::Actions
148
148
  end
149
149
  end
150
150
 
151
- def set_record_attribute(column, attribute, value)
151
+ def batch_create_set_record_attribute(column, attribute, value)
152
152
  form_ui = colunm_form_ui(column)
153
153
  if form_ui && override_batch_create_value?(form_ui)
154
154
  @record.send("#{attribute}=", send(override_batch_create_value(form_ui), column, @record, value))
@@ -167,7 +167,7 @@ module ActiveScaffold::Actions
167
167
  end
168
168
 
169
169
 
170
- def attribute_values_from_params(columns, attributes)
170
+ def batch_create_attribute_values_from_params(columns, attributes)
171
171
  values = {}
172
172
  columns.each :for => new_model, :crud_type => :create, :flatten => true do |column|
173
173
  if batch_create_by_column == column.name
@@ -93,7 +93,7 @@ module ActiveScaffold::Actions
93
93
 
94
94
  def before_do_batch_update
95
95
  update_columns = active_scaffold_config.batch_update.columns
96
- @batch_update_values = attribute_values_from_params(update_columns, params[:record])
96
+ @batch_update_values = batch_update_attribute_values_from_params(update_columns, params[:record])
97
97
  end
98
98
 
99
99
  # in case of an error we have to prepare @record object to have assigned all
@@ -103,7 +103,7 @@ module ActiveScaffold::Actions
103
103
  do_new
104
104
  batch_update_values.each do |attribute, value|
105
105
  form_ui = colunm_form_ui(value[:column])
106
- set_record_attribute(value[:column], attribute, value[:value]) unless form_ui && override_batch_update_value?(form_ui)
106
+ batch_update_set_record_attribute(value[:column], attribute, value[:value]) unless form_ui && override_batch_update_value?(form_ui)
107
107
  end
108
108
  end
109
109
 
@@ -157,7 +157,7 @@ module ActiveScaffold::Actions
157
157
  @record = record
158
158
 
159
159
  batch_update_values.each do |attribute, value|
160
- set_record_attribute(value[:column], attribute, value[:value])
160
+ batch_update_set_record_attribute(value[:column], attribute, value[:value])
161
161
  end
162
162
 
163
163
  update_save({:no_record_param_update => true})
@@ -168,7 +168,7 @@ module ActiveScaffold::Actions
168
168
  end
169
169
  end
170
170
 
171
- def set_record_attribute(column, attribute, value)
171
+ def batch_update_set_record_attribute(column, attribute, value)
172
172
  form_ui = colunm_form_ui(column)
173
173
  if form_ui && override_batch_update_value?(form_ui)
174
174
  @record.send("#{attribute}=", send(override_batch_update_value(form_ui), column, @record, value))
@@ -202,7 +202,7 @@ module ActiveScaffold::Actions
202
202
  return sql_set, update_value
203
203
  end
204
204
 
205
- def attribute_values_from_params(columns, attributes)
205
+ def batch_update_attribute_values_from_params(columns, attributes)
206
206
  values = {}
207
207
  attributes = {} unless attributes.is_a?(Hash)
208
208
  columns.each :for => new_model, :crud_type => :update, :flatten => true do |column|
@@ -2,7 +2,7 @@ module ActiveScaffoldBatch
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 1
5
- PATCH = 6
5
+ PATCH = 7
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_vho
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.6
4
+ version: 3.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volker Hochstein