Skip to content

Commit

Permalink
added support for new rails 6 default image_processing for active_sto…
Browse files Browse the repository at this point in the history
…rage_variants
  • Loading branch information
kallelundgren93 committed Feb 19, 2020
1 parent 6cf0199 commit d3ea599
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ class MultipleActiveStorage < RailsAdmin::Config::Fields::Types::MultipleFileUpl

class ActiveStorageAttachment < RailsAdmin::Config::Fields::Types::MultipleFileUpload::AbstractAttachment
register_instance_option :thumb_method do
{resize: '100x100>'}
if Gem.loaded_specs.key?('ruby-vips')
{resize_to_limit: [100, 100]}
else
{resize: '100x100>'}
end
end

register_instance_option :delete_value do
Expand Down

0 comments on commit d3ea599

Please sign in to comment.