RubyFlow The Ruby and Rails community linklog

A lightweight way to handle different validation situations

Say you have an Article model, and it could be either a draft or a published article. The published article needs more validation than the draft. What’s the best way to write this? Rails has a lightly documented, little-known feature that makes these problems really easy to handle.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in