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

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -