Skip to content

Commit

Permalink
Merge pull request #174 from kukicola/fix-missing-block
Browse files Browse the repository at this point in the history
  • Loading branch information
gr8bit authored Oct 27, 2022
2 parents ed8efba + 3204469 commit 97a06fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_storage_validations/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def read_image


raise InvalidImageError unless valid_image?(image)
yield image
yield image if block_given?
rescue LoadError, NameError
logger.info "Skipping image analysis because the mini_magick or ruby-vips gem isn't installed"
{}
Expand Down
1 change: 1 addition & 0 deletions test/active_storage_validations_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ class ActiveStorageValidations::Test < ActiveSupport::TestCase
e = OnlyImage.new
e.image.attach(image_1920x1080_file)
e.proc_image.attach(image_1920x1080_file)
e.another_image.attach(image_1920x1080_file)
assert e.valid?

e = OnlyImage.new
Expand Down

0 comments on commit 97a06fb

Please sign in to comment.