I've seen all of these:
is_valid
is_valid?
valid?
Is there a preferred one?
EDIT: More conditionals:
has_comment
has_comment?
comment?
was_full
was_full?
full?
Please do add more descriptive examples.
I've seen all of these:
is_valid
is_valid?
valid?
Is there a preferred one?
EDIT: More conditionals:
has_comment
has_comment?
comment?
was_full
was_full?
full?
Please do add more descriptive examples.
I think the convention is mostly to add a '?' at the end of the method instead of 'is'
valid?
In favor of trying the code to be 'natural language' like, is_valid? should be most suitable for me. Lets show an example:
if @order.is_valid? @order.save end