redmine development - overide model getter
I'm trying to overide model getter but I don't want to restart my application while I debug.
I am using Dispatcher.to_prepare and see the debugger go to the "Issue.send" line every time but I keep getting the same value (ex. changing 50 to 60 then refresh doesn't change the value...)
Windows 7 , netbeans 7.0.1 , ruby 1.8.7 , rails 2.3.14 , redmine 1.2.2 , ruby-debug-ide 0.4.16 , mongrel 1.1.5
config.cache_classes = false
config.action_controller.perform_caching = false
module RedmineDoneRatioFix module IssuePatch def self.included(base) base.class_eval do def done_ratio 50 end end end end end
require 'redmine' require 'dispatcher' Dispatcher.to_prepare :redmine_done_ratio_fix do Issue.send(:include, RedmineDoneRatioFix::IssuePatch) end
link to my stack overflow question:
Please help me.
Should be fixed as follows (answer given by the initial author over at stackoverflow):
Adding unloadable solved it:
module RedmineDoneRatioFix module IssuePatch def self.included(base) unloadable base.class_eval do def done_ratio 50 end end end end end