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

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -