ref: refs/heads/master
commit c4158fe7155e3f58858180aeaf207a60a03b9877
Author: Ladislav Slezak
Date: Tue Aug 18 15:37:08 2009 +0200
environment.rb - globally enable plugin reloading
---
plugins/system/init.rb | 13 -------------
webclient/config/environment.rb | 4 ++++
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/plugins/system/init.rb b/plugins/system/init.rb
index 59b5313..2877209 100644
--- a/plugins/system/init.rb
+++ b/plugins/system/init.rb
@@ -1,15 +1,2 @@
# Include hook code here
-# always reload all files in development mode
-if ENV['RAILS_ENV'] == 'development'
- # get all subdirectories in app/
- dirs = Dir[File.join(directory, 'app', '*')].reject{|x| not File.directory?(x)}
-
- dirs.each do |dir|
- $LOAD_PATH << dir
- ActiveSupport::Dependencies.load_paths << dir
- ActiveSupport::Dependencies.load_once_paths.delete(dir)
- end
-end
-
-# vim: ft=ruby
diff --git a/webclient/config/environment.rb b/webclient/config/environment.rb
index 5a4a39d..94da891 100644
--- a/webclient/config/environment.rb
+++ b/webclient/config/environment.rb
@@ -75,6 +75,10 @@ init = Rails::Initializer.run do |config|
config.gem "gettext_activerecord"
config.gem "gettext_rails"
+ # reload all plugins, changes in *.rb files take effect immediately
+ # it's here because of https://rails.lighthouseapp.com/projects/8994/tickets/2324-configreload_plug...
+ config.reload_plugins = true unless Rails.env.production?
+
# In order to prevent unloading of AuthenticatedSystem
config.load_once_paths += %W( #{RAILS_ROOT}/lib )
# allows to find plugin in development tree locations
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org