Open ydakuka opened 1 year ago
The #toggle method does not update a record, but the #toggle! method does without validations.
#toggle
#toggle!
References: https://guides.rubyonrails.org/active_record_validations.html#skipping-validations https://api.rubyonrails.org/v7.0.6/classes/ActiveRecord/Persistence.html#method-i-toggle
The
#toggle
method does not update a record, but the#toggle!
method does without validations.References: https://guides.rubyonrails.org/active_record_validations.html#skipping-validations https://api.rubyonrails.org/v7.0.6/classes/ActiveRecord/Persistence.html#method-i-toggle