active_scaffold_batch 3.4.0 → 3.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: af11e767025d20bb80b31cb2d330e2e33d6cb08f
4
- data.tar.gz: 654aa97b3d6ea2482d31efe41e60f8a7d190821b
2
+ SHA256:
3
+ metadata.gz: 7fd7d3f73ca9f5aa3536fc21dac45fcf446ed1d9098ea90b149ce337eaee9969
4
+ data.tar.gz: 1c4483c123f87cbcc54c1c78affb926c3176bf8b81e2a2e1ac518941942db47b
5
5
  SHA512:
6
- metadata.gz: 638487d305e9fe5d42ef1fa5abad1757c7d97d94fadc3cad8776cbcf98caeb225a05b8c6b72590ade4c36f6baf9281f157bf91eda5a9a1bf60c7fe069f9bd874
7
- data.tar.gz: 0222c76e3004511441843e213a759f305d9897c14ddd132ef8b8a47fddb1abeff7e7f81b103ff12acb00b8628614da77736e0e5f4f6a2042c274c39baa3ee15b
6
+ metadata.gz: 69ea5cd8c6b0c230025752636da9c4d228fe21d7efae492e0900081a88a82cfb86f00396c0255300471e79ce6d02ac13f9f69f23f7dffdbdddff32e8089d5d05
7
+ data.tar.gz: 852766696c6203c232d9e3d47c27ed521655f5d2b3c266a3c6e80a8942cdf5af2f53598f86d89347632e495d81c4c93137a642c345af6cc2788a84ed9acff621
@@ -3,7 +3,7 @@
3
3
  <li class="form-element">
4
4
  <%= hidden_field_tag("batch_scope", (batch_scope || 'LISTED')) %>
5
5
  </li>
6
- <% columns.each :for => @record do |column| %>
6
+ <% columns.each_column(for: @record) do |column| %>
7
7
  <% next unless column.association.nil? || column.association.belongs_to? %>
8
8
  <% renders_as = column_renders_as(column) %>
9
9
  <% if renders_as == :subsection -%>
@@ -1,6 +1,6 @@
1
1
  <thead>
2
2
  <tr>
3
- <% columns.each :flatten => true do |column| -%>
3
+ <% columns.each_column(flatten: true) do |column| -%>
4
4
  <% next if column_renders_as(column) == :hidden -%>
5
5
  <th class="<%= 'required' if column.required? %>"><label><%= column.label %></label></th>
6
6
  <% end -%>
@@ -7,7 +7,7 @@
7
7
  </tr>
8
8
  <% end %>
9
9
  <tr class="form_record">
10
- <% columns.each :flatten => true do |column| -%>
10
+ <% columns.each_column(flatten: true) do |column| -%>
11
11
  <%
12
12
  next if column_renders_as(column) == :hidden
13
13
  next unless record.authorized_for?(:crud_type => :create, :column => column.name)
@@ -3,7 +3,7 @@
3
3
  <li class="form-element">
4
4
  <%= render :partial => 'batch_update_form_attribute_scope' -%>
5
5
  </li>
6
- <% columns.each :for => @record do |column| %>
6
+ <% columns.each_column(for: @record) do |column| %>
7
7
  <% next unless column.association.nil? || column.association.belongs_to? %>
8
8
  <% renders_as = column_renders_as(column) %>
9
9
  <% if renders_as == :subsection -%>
@@ -104,7 +104,7 @@ module ActiveScaffold::Actions
104
104
  if respond_to? "#{action_name}_respond_to_xml", true
105
105
  send("#{action_name}_respond_to_xml")
106
106
  else
107
- render :xml => response_object.to_xml(:only => active_scaffold_config.send(action_name).columns.names), :content_type => Mime::XML, :status => response_status
107
+ render :xml => response_object.to_xml(:only => active_scaffold_config.send(action_name).columns.visible_columns_names), :content_type => Mime::XML, :status => response_status
108
108
  end
109
109
  end
110
110
 
@@ -112,7 +112,7 @@ module ActiveScaffold::Actions
112
112
  if respond_to? "#{action_name}_respond_to_json", true
113
113
  send("#{action_name}_respond_to_json")
114
114
  else
115
- render :text => response_object.to_json(:only => active_scaffold_config.send(action_name).columns.names), :content_type => Mime::JSON, :status => response_status
115
+ render :text => response_object.to_json(:only => active_scaffold_config.send(action_name).columns.visible_columns_names), :content_type => Mime::JSON, :status => response_status
116
116
  end
117
117
  end
118
118
 
@@ -120,7 +120,7 @@ module ActiveScaffold::Actions
120
120
  if respond_to? "#{action_name}_respond_to_yaml", true
121
121
  send("#{action_name}_respond_to_yaml")
122
122
  else
123
- render :text => Hash.from_xml(response_object.to_xml(:only => active_scaffold_config.send(action_name).columns.names)).to_yaml, :content_type => Mime::YAML, :status => response_status
123
+ render :text => Hash.from_xml(response_object.to_xml(:only => active_scaffold_config.send(action_name).columns.visible_columns_names)).to_yaml, :content_type => Mime::YAML, :status => response_status
124
124
  end
125
125
  end
126
126
 
@@ -212,7 +212,7 @@ module ActiveScaffold::Actions
212
212
  def create_attribute_values_from_params(columns, attributes)
213
213
  values = {}
214
214
  parent_record = active_scaffold_config.model.new
215
- columns.each :for => active_scaffold_config.model, :crud_type => :create, :flatten => true do |column|
215
+ columns.each_column(for: active_scaffold_config.model, crud_type: :create, flatten: true) do |column|
216
216
  next unless attributes.has_key?(column.name)
217
217
  if column == batch_create_by_column.to_sym
218
218
  @batch_create_by_records = batch_values_for_column(column, attributes[column.name])
@@ -174,7 +174,7 @@ module ActiveScaffold::Actions
174
174
  def update_attribute_values_from_params(columns, attributes)
175
175
  values = {}
176
176
  return values unless params_hash? attributes
177
- columns.each :for => new_model, :crud_type => :update, :flatten => true do |column|
177
+ columns.each_column(for: new_model, crud_type: :update, flatten: true) do |column|
178
178
  next unless params_hash?(attributes[column.name]) && attributes[column.name][:operator] != 'NO_UPDATE'
179
179
  value = attributes[column.name]
180
180
  value[:value] = value[:operator] == 'NULL' ? nil : column_value_from_param_value(nil, column, value[:value])
@@ -1,13 +1,13 @@
1
1
  # Need to open the AS module carefully due to Rails 2.3 lazy loading
2
2
  ActiveScaffold::Config::Core.class_eval do
3
- ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_edit] = :get
4
- ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_update] = :post
5
- ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_new] = :get
6
- ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_create] = :post
7
- ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_add] = :get
3
+ ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_edit] = :get
4
+ ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_update] = :post
5
+ ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_new] = :get
6
+ ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_create] = :post
7
+ ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_add] = :get
8
8
  #not working because routing picks show route instead
9
- #ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_destroy] = :get
9
+ #ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_destroy] = :get
10
10
  #you may define a route for your controller before resource routes
11
11
  #match 'players/batch_destroy' => 'players#batch_destroy', :via => [:get]
12
- ActionDispatch::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_destroy] = :delete
12
+ ActiveScaffold::Routing::ACTIVE_SCAFFOLD_CORE_ROUTING[:collection][:batch_destroy] = :delete
13
13
  end
@@ -2,7 +2,7 @@ module ActiveScaffoldBatch
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 4
5
- PATCH = 0
5
+ PATCH = 1
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.4.0
4
+ version: 3.4.1
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: 2017-03-22 00:00:00.000000000 Z
12
+ date: 2019-03-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -31,28 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 3.4.18
34
+ version: 3.6.0.pre
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: 3.4.18
42
- - !ruby/object:Gem::Dependency
43
- name: rails
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: '4.0'
49
- type: :runtime
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: '4.0'
41
+ version: 3.6.0.pre
56
42
  description: You want to destroy/update many records at once with activescaffold?
57
43
  email: activescaffold@googlegroups.com
58
44
  executables: []
@@ -124,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
110
  version: '0'
125
111
  requirements: []
126
112
  rubyforge_project:
127
- rubygems_version: 2.6.10
113
+ rubygems_version: 2.7.8
128
114
  signing_key:
129
115
  specification_version: 4
130
116
  summary: Batch Processing for ActiveScaffold