Avoid unnecessary SQL statement.
Please Rubocop.