# 跳过回调

主要有 4 种方式：

**update\_columns 和 update\_column** \
&#x20;它们都是直接执行 SQL 语句，不会触发回调方法。

使用举例：

```ruby
user.update_columns(last_request_at: Time.current)
```

**save(:validate => false)**

跳过 Model 里的所有校验。

**skip\_callback** \
&#x20;跳过某个回调。

使用举例：

```ruby
class Writer < Person
  skip_callback :validate, :before, :check_membership, if: -> { self.age > 18 }
end
```

**x\_without\_callbacks** \
&#x20;以 object.send(:x\_without\_callbacks) 跳过某个系列的回调。

使用举例：

```ruby
object.send(:create_without_callbacks)
object.send(:update_without_callbacks)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kelby.gitbook.io/rails-beginner-s-guide/activerecord_utility/callbacks/skip_callbacks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
