How to make "return" from hook?

Added by Nhan Nguyen about 12 years ago


I known that hook is used to extend Redmine code in plugins, however, i'm facing a situation following:

I expect passing some conditions before saving the issue, I used controller_issues edit_before_save hook but i don't know how to stop saving when having a not-meet condition in hook.

Could everyone help me?


Replies (1)

RE: How to make "return" from hook? - Added by Holger Just about 12 years ago

That's not possible using Redmine's Hooks. However, you can use the default ActiveRecord Callbacks which support this behavior.