Skip to content

Commit b60eeeb

Browse files
committed
changed gem detection, const for plugin did nt work
1 parent 4b0d596 commit b60eeeb

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

init.rb

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
ACTIVE_SCAFFOLD_INSTALLED = :plugin
2-
31
require 'active_scaffold'
42

53
begin

lib/active_scaffold.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,12 @@ def uses_active_scaffold?
336336
## Run the install assets script, too, just to make sure
337337
## But at least rescue the action in production
338338
##
339+
339340
Rails::Application.initializer("active_scaffold.install_assets") do
340341
begin
341342
ActiveScaffoldAssets.copy_to_public(ActiveScaffold.root, {:clean_up_destination => true})
342343
rescue
343344
raise $! unless Rails.env == 'production'
344345
end
345-
end unless defined?(ACTIVE_SCAFFOLD_INSTALLED) && ACTIVE_SCAFFOLD_INSTALLED == :plugin
346+
end if defined?(ACTIVE_SCAFFOLD_GEM)
346347

lib/active_scaffold_vho.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
ACTIVE_SCAFFOLD_INSTALLED = :gem
1+
ACTIVE_SCAFFOLD_GEM = true
22
require 'active_scaffold'

lib/generators/active_scaffold_setup/active_scaffold_setup_generator.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def self.source_root
88
end
99

1010
def install_plugins
11-
unless defined?(ACTIVE_SCAFFOLD_INSTALLED) && ACTIVE_SCAFFOLD_INSTALLED == :gem
11+
unless defined?(ACTIVE_SCAFFOLD_GEM)
1212
plugin 'verification', :git => 'git://github.com/rails/verification.git'
1313
plugin 'render_component', :git => 'git://github.com/vhochstein/render_component.git'
1414
end
@@ -21,7 +21,7 @@ def install_plugins
2121
end
2222

2323
def configure_active_scaffold
24-
unless defined?(ACTIVE_SCAFFOLD_INSTALLED) && ACTIVE_SCAFFOLD_INSTALLED == :gem
24+
unless defined?(ACTIVE_SCAFFOLD_GEM)
2525
if js_lib == 'jquery'
2626
gsub_file 'vendor/plugins/active_scaffold/lib/environment.rb', /#ActiveScaffold.js_framework = :jquery/, 'ActiveScaffold.js_framework = :jquery'
2727
end

0 commit comments

Comments
 (0)