Rails update_attribute gotcha

Published:
Updated:
Article source on GitHub

Model#update_attribute(:name, "Rando") does not trigger any validations, even on name and just saves it to the database.

Model#update_attributes(:name => "Rando") does run all validations, and returns false if they fail.

Rails docs