# Finder Methods

**实例方法：**

```
exists?

find
find_by
find_by!

take
take!
```

和：

```
first
first!

second
second!

third
third!

fourth
fourth!

fifth
fifth!

forty_two
forty_two!

last
last!
```

除上述方法外，还有一些 protected 方法，但它们一般不会直接使用到。

> Rails 5 里 `find` 可以传递数组，如果没有明确排序的话，默认就使用数组里元素的顺序，这个太赞了。


---

# 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_db_opertion/database_opt_relation/relation_finder_methods.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.
