Closed pinnymz closed 12 years ago
As a possible workaround, see this commit that moves the monkey patch to a separate file that only loads when running the rake task - https://github.com/pinnymz/annotate_models/commit/aae82380edd8561944402ada717239c4b0b98e27
This issue was fixed in ctran/annotate_models by integrating the proposed patch - see https://github.com/ctran/annotate_models/pull/73
'annotate/annotate_models.rb' uses a monkey patched :method_missing to get around the problem of recognizing unknown macros ('acts_as_something' and the like). This monkey patch is only meant to be loaded when running the rake task to create annotations.
Unfortunately, we are requiring the 'annotate/annotate_models.rb' file to load in order to modify the output with comments. If we remove the requirement, our modification hook will never be inserted because the environment (and all gems) are loaded by the annotation rake task before the 'annotate/annotate_models.rb' file.
We'll need to find an alternative hooking method that doesn't require including the 'method_missing' monkey patch.