fix: use prepend instead of alias_method pattern - #206
Conversation
|
Thanks for digging into this, @mhier - and no need to apologise, your analysis is spot on. You've actually identified exactly the reason we haven't switched to The good news: we very much want to move to So the timing isn't quite right yet, but you're pushing in exactly the direction we'll go. Let's keep this open / on the radar until RedmineUp's release lands. |
|
Thanks, that's good news. I am currently in contact with RedmineUp and working with them to move their plugins to the |
When combining the additionals plugin with other plugins, e.g. the redmine_products plugin by RedmineUp, some pages like
/my/pagewill crash with the following stack trace:This PR aims at fixing this, by changing the way how the plugin overrides methods to the modern
prepend-based pattern instead of using the outdatedalias_methodpattern.Note: I am not a ruby expert, so maybe I am doing it in the wrong way here. I apologise in that case.
Note2: This is a draft, because I am using a pre-release version of the redmine_products plugin. The current release also uses the old alias_method. Unfortunately, this is incompatible in both directions. I know, other plugins also move to the new
prepend-based pattern, so this plugin should eventually do it as well, but maybe it is not the right timing yet?