1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-06 09:03:25 +00:00

Class mismatch when reloading in development mode (#17431).

git-svn-id: http://svn.redmine.org/redmine/trunk@13323 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2014-07-14 10:37:10 +00:00
parent dd11d70eb9
commit 8d982736e0
2 changed files with 10 additions and 0 deletions

View File

@ -20,3 +20,9 @@ Redmine::Plugin.load
unless Redmine::Configuration['mirror_plugins_assets_on_startup'] == false
Redmine::Plugin.mirror_assets
end
Rails.application.config.to_prepare do
Redmine::FieldFormat::RecordList.subclasses.each do |klass|
klass.instance.reset_target_class
end
end

View File

@ -597,6 +597,10 @@ module Redmine
def target_class
@target_class ||= self.class.name[/^(.*::)?(.+)Format$/, 2].constantize rescue nil
end
def reset_target_class
@target_class = nil
end
def possible_custom_value_options(custom_value)
options = possible_values_options(custom_value.custom_field, custom_value.customized)