Project

General

Profile

How to make "return" from hook?

Added by Nhan Nguyen over 13 years ago

Hello!

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?

thank.
Nhanntit


Replies (1)

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

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

    (1-1/1)