rails_best_practices
rails_best_practices copied to clipboard
False positive : check 'save' return value or use 'save!'
Hi everybody
I think I found a false positive using rails_best_practices, with this type of line:
@success = [email protected]
It can be a weird line, but I want to be sure that @success
is a boolean.
I get this error : check 'save' return value or use 'save!'
, even if I check the result.
I have the same error with @success = [email protected]_attribute(...)
Using !!
doesn't really make sense here – ActiveRecord's save
will always return true or false.