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 committed 2009-04-10 08:49:12 -07:00
1 parent 71ab0c6b54
commit fd891e7f51
3 files changed
+8 -9

No files matched your search

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