Ruby

Ruby

Made by DeepSource

Method skips model validation RB-RL1053

Anti-pattern
Major

Some methods (listed here) save the objects to the database irrespective of their validity. They should be used with caution.

For example, touch is one such method.

product.touch

By default, these methods are not allowed: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns and update_counters.

The allowlist and disallow-list can be configured in the .rubocop.yml file.