##// END OF EJS Templates
Merged r11497 from trunk (#13329)....
Jean-Philippe Lang -
r11344:53680edb2d80
parent child
Show More
@@ -184,11 +184,12 class Issue < ActiveRecord::Base
184 super
184 super
185 end
185 end
186
186
187 alias :base_reload :reload
187 def reload(*args)
188 def reload(*args)
188 @workflow_rule_by_attribute = nil
189 @workflow_rule_by_attribute = nil
189 @assignable_versions = nil
190 @assignable_versions = nil
190 @relations = nil
191 @relations = nil
191 super
192 base_reload(*args)
192 end
193 end
193
194
194 # Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
195 # Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
@@ -285,6 +285,7 class Project < ActiveRecord::Base
285 self.find(*args)
285 self.find(*args)
286 end
286 end
287
287
288 alias :base_reload :reload
288 def reload(*args)
289 def reload(*args)
289 @shared_versions = nil
290 @shared_versions = nil
290 @rolled_up_versions = nil
291 @rolled_up_versions = nil
@@ -297,7 +298,7 class Project < ActiveRecord::Base
297 @actions_allowed = nil
298 @actions_allowed = nil
298 @start_date = nil
299 @start_date = nil
299 @due_date = nil
300 @due_date = nil
300 super
301 base_reload(*args)
301 end
302 end
302
303
303 def to_param
304 def to_param
@@ -128,11 +128,12 class User < Principal
128 end
128 end
129 end
129 end
130
130
131 alias :base_reload :reload
131 def reload(*args)
132 def reload(*args)
132 @name = nil
133 @name = nil
133 @projects_by_role = nil
134 @projects_by_role = nil
134 @membership_by_project_id = nil
135 @membership_by_project_id = nil
135 super
136 base_reload(*args)
136 end
137 end
137
138
138 def mail=(arg)
139 def mail=(arg)
@@ -33,7 +33,6 module Redmine
33 :dependent => :delete_all,
33 :dependent => :delete_all,
34 :validate => false
34 :validate => false
35
35
36 send :alias_method, :reload_without_custom_fields, :reload
37 send :include, Redmine::Acts::Customizable::InstanceMethods
36 send :include, Redmine::Acts::Customizable::InstanceMethods
38 validate :validate_custom_field_values
37 validate :validate_custom_field_values
39 after_save :save_custom_field_values
38 after_save :save_custom_field_values
@@ -43,6 +42,7 module Redmine
43 module InstanceMethods
42 module InstanceMethods
44 def self.included(base)
43 def self.included(base)
45 base.extend ClassMethods
44 base.extend ClassMethods
45 base.send :alias_method_chain, :reload, :custom_fields
46 end
46 end
47
47
48 def available_custom_fields
48 def available_custom_fields
@@ -154,7 +154,7 module Redmine
154 @custom_field_values_changed = true
154 @custom_field_values_changed = true
155 end
155 end
156
156
157 def reload(*args)
157 def reload_with_custom_fields(*args)
158 @custom_field_values = nil
158 @custom_field_values = nil
159 @custom_field_values_changed = false
159 @custom_field_values_changed = false
160 reload_without_custom_fields(*args)
160 reload_without_custom_fields(*args)
General Comments 0
You need to be logged in to leave comments. Login now