未验证 提交 c61d6729 编写于 作者: G George Claghorn 提交者: GitHub

Merge pull request #33040 from ybakos/guides/active_storage_overview_example_syntax_fix

Remove 'Current.' prefix from example.
......@@ -248,13 +248,13 @@ end
Call `avatar.attach` to attach an avatar to an existing user:
```ruby
Current.user.avatar.attach(params[:avatar])
user.avatar.attach(params[:avatar])
```
Call `avatar.attached?` to determine whether a particular user has an avatar:
```ruby
Current.user.avatar.attached?
user.avatar.attached?
```
### `has_many_attached`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册