mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
use new vips syntax for named variant examples
This commit is contained in:
parent
a17629e393
commit
b6766b847b
1 changed files with 2 additions and 2 deletions
|
@ -430,7 +430,7 @@ You can configure specific variants per attachment by calling the `variant` meth
|
|||
```ruby
|
||||
class User < ApplicationRecord
|
||||
has_one_attached :avatar do |attachable|
|
||||
attachable.variant :thumb, resize: "100x100"
|
||||
attachable.variant :thumb, resize_to_limit: [100, 100]
|
||||
end
|
||||
end
|
||||
```
|
||||
|
@ -506,7 +506,7 @@ Configuring specific variants is done the same way as `has_one_attached`, by cal
|
|||
```ruby
|
||||
class Message < ApplicationRecord
|
||||
has_many_attached :images do |attachable|
|
||||
attachable.variant :thumb, resize: "100x100"
|
||||
attachable.variant :thumb, resize_to_limit: [100, 100]
|
||||
end
|
||||
end
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue