1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fix rubocop errors

Using `bundle exec rubocop -a` and visually verified
This commit is contained in:
Hartley McGuire 2022-03-08 15:36:24 -05:00
parent 9b76e93fea
commit c3844a9dc0
3 changed files with 6 additions and 6 deletions

View file

@ -340,7 +340,7 @@ module ActiveStorage
end end
def validate_transformation(name, argument) def validate_transformation(name, argument)
method_name = name.to_s.gsub("-","_") method_name = name.to_s.tr("-", "_")
unless SUPPORTED_IMAGE_PROCESSING_METHODS.any? { |method| method_name == method } unless SUPPORTED_IMAGE_PROCESSING_METHODS.any? { |method| method_name == method }
raise UnsupportedImageProcessingMethod, <<~ERROR.squish raise UnsupportedImageProcessingMethod, <<~ERROR.squish

View file

@ -3136,7 +3136,7 @@ module ApplicationTests
app "development" app "development"
assert ActiveStorage.unsupported_image_processing_arguments.include?("-danger") assert ActiveStorage.unsupported_image_processing_arguments.include?("-danger")
refute ActiveStorage.unsupported_image_processing_arguments.include?("-set") assert_not ActiveStorage.unsupported_image_processing_arguments.include?("-set")
end end
test "hosts include .localhost in development" do test "hosts include .localhost in development" do