Ruby on Rails: Update boolean record in database

If you want to toggle the boolean:

u.toggle!(:<attribute>)  # Toggles the boolean and saves without validations
u.toggle(:<attribute>)   # Toggles the boolean and does not save

If you want to set the boolean:

u.<attribute> = [true|false]

If you want to update the boolean immediately:

u.update_column(:<attribute>, [true|false])  # Doesn't update timestamps or call callbacks
u.update_attribute(:<attribute>, [true|false])  # Updates timestamps and triggers any callbacks