Changed the Redmine core patches to use the Rails dispatcher.

This will let the core patches work in development mode when the classes
are reloaded.
This commit is contained in:
Eric Davis
2009-04-10 08:49:12 -07:00
parent 71ab0c6b54
commit fd891e7f51
3 changed files with 8 additions and 9 deletions

11
init.rb
View File

@@ -1,8 +1,13 @@
require 'redmine'
# Patches to the Redmine core. Will not work in development mode
require_dependency 'issue_patch'
require_dependency 'query_patch'
# Patches to the Redmine core.
require 'dispatcher'
require 'issue_patch'
require 'query_patch'
Dispatcher.to_prepare do
Issue.send(:include, IssuePatch)
Query.send(:include, QueryPatch)
end
# Hooks
require_dependency 'budget_issue_hook'

View File

@@ -32,7 +32,4 @@ module IssuePatch
end
end
# Add module to Issue
Issue.send(:include, IssuePatch)

View File

@@ -50,7 +50,4 @@ module QueryPatch
end
end
# Add module to Query
Query.send(:include, QueryPatch)