Validation problems on manual update of attribute value in Rails console

if you want to bypass validation, use

# skip validations but run callbacks
u.update_attribute :roles_mask, 3

or

# do the update on the sql so no validation and callback is executed
u.update_column :roles_mask, 3

Leave a Comment