Skipping Validations

Use following methods if you want to skip the validations. These methods will save the object to the database even if it is invalid.

  • decrement!
  • decrement_counter
  • increment!
  • increment_counter
  • toggle!
  • touch
  • update_all
  • update_attribute
  • update_column
  • update_columns
  • update_counters

You can also skip validation while saving by passing validate as an argument to save

User.save(validate: false)

results matching ""

    No results matching ""