summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-24 18:38:05 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-24 18:38:05 +0000
commit492cce79759dec1d6e2fbd3931a04b20205bb5f4 (patch)
treede5b83e7a928b00a24b42d247e5ce883672c02c5
parent67d816705d23184a0d1fdbd9687926055041e280 (diff)
downloadredmine-492cce79759dec1d6e2fbd3931a04b20205bb5f4.tar.gz
redmine-492cce79759dec1d6e2fbd3931a04b20205bb5f4.zip
Cleanup instance variables when reloading a project.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8979 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/project.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 997ed4615..db1c092e8 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -272,6 +272,19 @@ class Project < ActiveRecord::Base
end
end
+ def reload(*args)
+ @shared_versions = nil
+ @rolled_up_versions = nil
+ @rolled_up_trackers = nil
+ @all_issue_custom_fields = nil
+ @all_time_entry_custom_fields = nil
+ @to_param = nil
+ @allowed_parents = nil
+ @allowed_permissions = nil
+ @actions_allowed = nil
+ super
+ end
+
def to_param
# id is used for projects with a numeric identifier (compatibility)
@to_param ||= (identifier.to_s =~ %r{^\d*$} ? id.to_s : identifier)