super
end
+ alias :base_reload :reload
def reload(*args)
@workflow_rule_by_attribute = nil
@assignable_versions = nil
@relations = nil
- super
+ base_reload(*args)
end
# Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
:dependent => :delete_all,
:validate => false
- send :alias_method, :reload_without_custom_fields, :reload
send :include, Redmine::Acts::Customizable::InstanceMethods
validate :validate_custom_field_values
after_save :save_custom_field_values
module InstanceMethods
def self.included(base)
base.extend ClassMethods
+ base.send :alias_method_chain, :reload, :custom_fields
end
def available_custom_fields
@custom_field_values_changed = true
end
- def reload(*args)
+ def reload_with_custom_fields(*args)
@custom_field_values = nil
@custom_field_values_changed = false
reload_without_custom_fields(*args)