ruby-on-railsrubyattributesnaming-conventions

Naming conventions for boolean attributes


I want to write code that others easily can understand as well.

Do boolean attributes like hide_email or email_hidden have a convention style?


Solution

  • I think of it like this:

    So, for your specific case, name your attribute like this:

    Why?