Rename attribute to attribute_name

This commit is contained in:
Eric 2020-05-15 12:09:13 -05:00
parent 2ad9ac8c92
commit afecb1d63f

View file

@ -1,11 +1,11 @@
module Image::AttachmentExtensions
extend ActiveSupport::Concern
class_methods do
def has_one_attached_with_sizes(attribute, sizes)
def has_one_attached_with_sizes(attribute_name, sizes)
if sizes.nil? || !sizes.is_a?(Hash) || !sizes.any?
raise ArgumentError, "You must pass a valid hash of sizes"
end
attribute = attribute.to_s
attribute = attribute_name.to_s
# clean up sizes
sizes.keys.each do |key|