1
0
Fork 0
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:
Steven Hilton 2021-12-30 22:21:35 +00:00
parent a17629e393
commit b6766b847b

View file

@ -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
```