active_scaffold_batch_vho 3.0.3 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -22,7 +22,7 @@ Jeweler::Tasks.new do |gem|
22
22
  gem.description = %Q{You want to destroy/update many records at once with activescaffold?}
23
23
  gem.email = "activescaffold@googlegroups.com"
24
24
  gem.authors = ["Volker Hochstein"]
25
- gem.add_runtime_dependency 'active_scaffold_vho', '> 3.0.12'
25
+ gem.add_runtime_dependency 'active_scaffold_vho', '> 3.0.13'
26
26
  # Include your dependencies below. Runtime dependencies are required when using your gem,
27
27
  # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
28
28
  # gem.add_runtime_dependency 'jabber4r', '> 0.1'
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{active_scaffold_batch_vho}
8
- s.version = "3.0.3"
8
+ s.version = "3.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Volker Hochstein"]
12
- s.date = %q{2011-02-18}
12
+ s.date = %q{2011-03-05}
13
13
  s.description = %q{You want to destroy/update many records at once with activescaffold?}
14
14
  s.email = %q{activescaffold@googlegroups.com}
15
15
  s.extra_rdoc_files = [
@@ -70,20 +70,20 @@ Gem::Specification.new do |s|
70
70
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
71
71
  s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
72
72
  s.add_development_dependency(%q<rcov>, [">= 0"])
73
- s.add_runtime_dependency(%q<active_scaffold_vho>, ["> 3.0.12"])
73
+ s.add_runtime_dependency(%q<active_scaffold_vho>, ["> 3.0.13"])
74
74
  else
75
75
  s.add_dependency(%q<shoulda>, [">= 0"])
76
76
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
77
77
  s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
78
78
  s.add_dependency(%q<rcov>, [">= 0"])
79
- s.add_dependency(%q<active_scaffold_vho>, ["> 3.0.12"])
79
+ s.add_dependency(%q<active_scaffold_vho>, ["> 3.0.13"])
80
80
  end
81
81
  else
82
82
  s.add_dependency(%q<shoulda>, [">= 0"])
83
83
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
84
84
  s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
85
85
  s.add_dependency(%q<rcov>, [">= 0"])
86
- s.add_dependency(%q<active_scaffold_vho>, ["> 3.0.12"])
86
+ s.add_dependency(%q<active_scaffold_vho>, ["> 3.0.13"])
87
87
  end
88
88
  end
89
89
 
@@ -117,9 +117,13 @@ module ActiveScaffold::Actions
117
117
  end
118
118
  end
119
119
 
120
+ def new_batch_create_record
121
+ new_model
122
+ end
123
+
120
124
  def create_record(batch_record)
121
125
  @successful = nil
122
- @record = new_model
126
+ @record = new_batch_create_record
123
127
  @record.send("#{batch_create_by_column.to_s}=", batch_record)
124
128
  batch_create_values.each do |attribute, value|
125
129
  set_record_attribute(value[:column], attribute, value[:value])
@@ -156,7 +160,7 @@ module ActiveScaffold::Actions
156
160
 
157
161
  def attribute_values_from_params(columns, attributes)
158
162
  values = {}
159
- columns.each :for => active_scaffold_config.model.new, :crud_type => :create, :flatten => true do |column|
163
+ columns.each :for => new_model, :crud_type => :create, :flatten => true do |column|
160
164
  if batch_create_by_column == column.name
161
165
  @batch_create_by_records = column_plural_assocation_value_from_value(column, attributes[column.name])
162
166
  else
@@ -162,7 +162,7 @@ module ActiveScaffold::Actions
162
162
  set_record_attribute(value[:column], attribute, value[:value])
163
163
  end
164
164
 
165
- update_save
165
+ update_save({:no_record_param_update => true})
166
166
  if successful?
167
167
  @record.marked = false if batch_scope == 'MARKED'
168
168
  else
@@ -206,7 +206,7 @@ module ActiveScaffold::Actions
206
206
 
207
207
  def attribute_values_from_params(columns, attributes)
208
208
  values = {}
209
- columns.each :for => active_scaffold_config.model.new, :crud_type => :update, :flatten => true do |column|
209
+ columns.each :for => new_model, :crud_type => :update, :flatten => true do |column|
210
210
  values[column.name] = {:column => column, :value => attributes[column.name].merge(:value => column_value_from_param_value(nil, column, attributes[column.name][:value]))} if selected_columns.include? column.name
211
211
  end
212
212
  values
@@ -1,10 +1,11 @@
1
1
  de:
2
2
  active_scaffold:
3
- no_update: ---
3
+ no_update: '- Auswählen -'
4
4
  replace: Ersetzen
5
5
  plus: '+'
6
6
  minus: '-'
7
7
  times: '*'
8
8
  division: '/'
9
9
  absolute: abs
10
- percent: '%'
10
+ percent: '%'
11
+ batch_update: 'Speichern'
@@ -7,4 +7,5 @@ en:
7
7
  times: '*'
8
8
  division: '/'
9
9
  absolute: abs
10
- percent: '%'
10
+ percent: '%'
11
+ batch_update: 'Batch Update'
@@ -2,7 +2,7 @@ module ActiveScaffoldBatch
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 0
5
- PATCH = 3
5
+ PATCH = 4
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold_batch_vho
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 3
10
- version: 3.0.3
9
+ - 4
10
+ version: 3.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Volker Hochstein
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-18 00:00:00 +01:00
18
+ date: 2011-03-05 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -86,12 +86,12 @@ dependencies:
86
86
  requirements:
87
87
  - - ">"
88
88
  - !ruby/object:Gem::Version
89
- hash: 31
89
+ hash: 29
90
90
  segments:
91
91
  - 3
92
92
  - 0
93
- - 12
94
- version: 3.0.12
93
+ - 13
94
+ version: 3.0.13
95
95
  requirement: *id005
96
96
  type: :runtime
97
97
  description: You want to destroy/update many records at once with activescaffold?