Fixed: Project#enabled_module_names= does not test if a module is already enabled (#4200).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3036 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-11-13 17:50:21 +00:00
parent 0241003590
commit 28f0b5ce4a
1 changed files with 1 additions and 1 deletions

View File

@ -389,7 +389,7 @@ class Project < ActiveRecord::Base
# remove disabled modules
enabled_modules.each {|mod| mod.destroy unless module_names.include?(mod.name)}
# add new modules
module_names.each {|name| enabled_modules << EnabledModule.new(:name => name)}
module_names.reject {|name| module_enabled?(name)}.each {|name| enabled_modules << EnabledModule.new(:name => name)}
else
enabled_modules.clear
end