active_scaffold_batch_vho 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/active_scaffold_batch_vho.gemspec +6 -5
- data/lib/active_scaffold/actions/batch_create.rb +0 -3
- data/lib/active_scaffold/actions/batch_update.rb +0 -3
- data/lib/active_scaffold_batch.rb +3 -26
- data/lib/active_scaffold_batch/engine.rb +28 -0
- data/lib/active_scaffold_batch/version.rb +1 -1
- metadata +7 -5
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.1'
|
25
|
+
gem.add_runtime_dependency 'active_scaffold_vho', '>= 3.1.2'
|
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.1.
|
8
|
+
s.version = "3.1.1"
|
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{
|
12
|
+
s.date = %q{2012-02-11}
|
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 = [
|
@@ -49,6 +49,7 @@ Gem::Specification.new do |s|
|
|
49
49
|
"lib/active_scaffold/helpers/update_column_helpers.rb",
|
50
50
|
"lib/active_scaffold_batch.rb",
|
51
51
|
"lib/active_scaffold_batch/config/core.rb",
|
52
|
+
"lib/active_scaffold_batch/engine.rb",
|
52
53
|
"lib/active_scaffold_batch/locale/de.yml",
|
53
54
|
"lib/active_scaffold_batch/locale/en.yml",
|
54
55
|
"lib/active_scaffold_batch/version.rb",
|
@@ -68,16 +69,16 @@ Gem::Specification.new do |s|
|
|
68
69
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
69
70
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
70
71
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
71
|
-
s.add_runtime_dependency(%q<active_scaffold_vho>, [">= 3.1"])
|
72
|
+
s.add_runtime_dependency(%q<active_scaffold_vho>, [">= 3.1.2"])
|
72
73
|
else
|
73
74
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
74
75
|
s.add_dependency(%q<rcov>, [">= 0"])
|
75
|
-
s.add_dependency(%q<active_scaffold_vho>, [">= 3.1"])
|
76
|
+
s.add_dependency(%q<active_scaffold_vho>, [">= 3.1.2"])
|
76
77
|
end
|
77
78
|
else
|
78
79
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
79
80
|
s.add_dependency(%q<rcov>, [">= 0"])
|
80
|
-
s.add_dependency(%q<active_scaffold_vho>, [">= 3.1"])
|
81
|
+
s.add_dependency(%q<active_scaffold_vho>, [">= 3.1.2"])
|
81
82
|
end
|
82
83
|
end
|
83
84
|
|
@@ -3,9 +3,6 @@ module ActiveScaffold::Actions
|
|
3
3
|
|
4
4
|
def self.included(base)
|
5
5
|
base.before_filter :batch_create_authorized_filter, :only => [:batch_new, :batch_create]
|
6
|
-
base.verify :method => [:post, :put],
|
7
|
-
:only => :batch_create,
|
8
|
-
:redirect_to => { :action => :index }
|
9
6
|
base.helper_method :batch_create_values
|
10
7
|
base.helper_method :batch_create_by_column
|
11
8
|
base.helper_method :batch_create_by_records
|
@@ -23,9 +23,6 @@ module ActiveScaffold::Actions
|
|
23
23
|
|
24
24
|
def self.included(base)
|
25
25
|
base.before_filter :batch_update_authorized_filter, :only => [:batch_edit, :batch_update]
|
26
|
-
base.verify :method => [:post, :put],
|
27
|
-
:only => :batch_update,
|
28
|
-
:redirect_to => { :action => :index }
|
29
26
|
base.helper_method :batch_update_values
|
30
27
|
end
|
31
28
|
|
@@ -1,8 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
# Load our overrides
|
5
|
-
require "active_scaffold_batch/config/core.rb"
|
1
|
+
require 'active_scaffold_batch/engine'
|
2
|
+
require 'active_scaffold_batch/version'
|
6
3
|
|
7
4
|
module ActiveScaffoldBatch
|
8
5
|
def self.root
|
@@ -24,24 +21,4 @@ module ActiveScaffold
|
|
24
21
|
end
|
25
22
|
end
|
26
23
|
|
27
|
-
I18n.load_path += Dir[File.join(File.dirname(__FILE__), 'active_scaffold_batch', 'locale', '*.{rb,yml}')]
|
28
|
-
|
29
|
-
##
|
30
|
-
## Run the install assets script, too, just to make sure
|
31
|
-
## But at least rescue the action in production
|
32
|
-
##
|
33
|
-
Rails::Application.initializer("active_scaffold_batch.install_assets", :after => "active_scaffold.install_assets") do
|
34
|
-
begin
|
35
|
-
ActionView::Base.class_eval do
|
36
|
-
include ActiveScaffold::Helpers::UpdateColumnHelpers
|
37
|
-
if ActiveScaffold.js_framework == :jquery
|
38
|
-
include ActiveScaffold::Helpers::DatepickerUpdateColumnHelpers
|
39
|
-
elsif ActiveScaffold.js_framework == :prototype
|
40
|
-
include ActiveScaffold::Helpers::CalendarDateSelectUpdateColumnHelpers
|
41
|
-
end
|
42
|
-
include ActiveScaffold::Helpers::BatchCreateColumnHelpers
|
43
|
-
end
|
44
|
-
rescue
|
45
|
-
raise $! unless Rails.env == 'production'
|
46
|
-
end
|
47
|
-
end if defined?(ACTIVE_SCAFFOLD_BATCH_GEM)
|
24
|
+
I18n.load_path += Dir[File.join(File.dirname(__FILE__), 'active_scaffold_batch', 'locale', '*.{rb,yml}')]
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module ActiveScaffoldBatch
|
2
|
+
#do not use module Rails... cause Rails.logger will fail
|
3
|
+
# not sure if it is a must though...
|
4
|
+
#module Rails
|
5
|
+
class Engine < ::Rails::Engine
|
6
|
+
initializer("initialize_active_scaffold_batch", :after => "initialize_active_scaffold") do
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
require "active_scaffold_batch/config/core.rb"
|
9
|
+
end
|
10
|
+
|
11
|
+
ActiveSupport.on_load(:action_view) do
|
12
|
+
begin
|
13
|
+
|
14
|
+
include ActiveScaffold::Helpers::UpdateColumnHelpers
|
15
|
+
if ActiveScaffold.js_framework == :jquery
|
16
|
+
include ActiveScaffold::Helpers::DatepickerUpdateColumnHelpers
|
17
|
+
elsif ActiveScaffold.js_framework == :prototype
|
18
|
+
include ActiveScaffold::Helpers::CalendarDateSelectUpdateColumnHelpers
|
19
|
+
end
|
20
|
+
include ActiveScaffold::Helpers::BatchCreateColumnHelpers
|
21
|
+
rescue
|
22
|
+
raise $! unless Rails.env == 'production'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
#end
|
28
|
+
end
|
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 3
|
7
7
|
- 1
|
8
|
-
-
|
8
|
+
- 1
|
9
9
|
segments_generated: true
|
10
|
-
version: 3.1.
|
10
|
+
version: 3.1.1
|
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:
|
18
|
+
date: 2012-02-11 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -56,8 +56,9 @@ dependencies:
|
|
56
56
|
segments:
|
57
57
|
- 3
|
58
58
|
- 1
|
59
|
+
- 2
|
59
60
|
segments_generated: true
|
60
|
-
version:
|
61
|
+
version: 3.1.2
|
61
62
|
type: :runtime
|
62
63
|
prerelease: false
|
63
64
|
version_requirements: *id003
|
@@ -103,6 +104,7 @@ files:
|
|
103
104
|
- lib/active_scaffold/helpers/update_column_helpers.rb
|
104
105
|
- lib/active_scaffold_batch.rb
|
105
106
|
- lib/active_scaffold_batch/config/core.rb
|
107
|
+
- lib/active_scaffold_batch/engine.rb
|
106
108
|
- lib/active_scaffold_batch/locale/de.yml
|
107
109
|
- lib/active_scaffold_batch/locale/en.yml
|
108
110
|
- lib/active_scaffold_batch/version.rb
|
@@ -122,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
122
124
|
requirements:
|
123
125
|
- - ">="
|
124
126
|
- !ruby/object:Gem::Version
|
125
|
-
hash:
|
127
|
+
hash: 560724973957209221
|
126
128
|
segments:
|
127
129
|
- 0
|
128
130
|
segments_generated: true
|