Rails 2.3+Rake: monkey patch method of class used in rake task -


how monkey patch method of class used in rake task? in particular want redefine method synthesis::assetpackage#compress_js of asset:packager plugin. tried place redefinition in rakefile in rails_root, didn't work. i'd rather not change plugin directly.

you have redefine after synthesis gets loaded. guess app's rake tasks (rails.root/lib/tasks/*.rake) loaded after plugins, try moving monkey-patch there.

in general, shouldn't modify rails app's rakefile directly anyway; put custom rake tasks or other customizations lib/tasks/*.rake.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -