ruby - returning from a rails method with a string -
The basic question I'm afraid of, but I can not find the answer I have a method on a model called "Warning Flag" I want to stop the method and return the string to one of the few conditions so that the code is not run unnecessarily. So something like that
def warnings_flag "no flag" and return to self-active? ... Finish things here However, this is clearly wrong, it stops the code, but returns only a zero.
Help!
simply do:
def warning_backup until active " Any flag "? ... finish things here
Comments
Post a Comment