What is the difference between update and update_attribute?

Answer

update(hash) updates multiple attributes at once, runs all validations and callbacks, and returns true/false. update_attribute(name, value) updates a single attribute, skips validations but still runs callbacks. update_columns(hash) updates directly in the database, skipping both validations and callbacks (useful for performance-critical updates or updating without triggering side effects). update_column(name, value) is the single-attribute version. Use update for normal business logic and update_columns for low-level or bulk updates where you want maximum performance.