]> source.dussan.org Git - redmine.git/commitdiff
Cleanup instance variables when reloading a project.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 24 Feb 2012 18:38:05 +0000 (18:38 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 24 Feb 2012 18:38:05 +0000 (18:38 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8979 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/project.rb

index 997ed4615d37d757b77724e457a4068a7729e980..db1c092e88bf8c284c788cd4a363f71daf75739f 100644 (file)
@@ -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)