Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bep-1279]Fixed keyword arguments for ruby update to 3.1.4 in application-form app #3

Merged
merged 4 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/paperclip/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def attachment(*attachment_names)
attachment_names.each do |attachment_name|
COLUMNS.each_pair do |column_name, column_type|
column_options = options.merge(options[column_name.to_sym] || {})
column("#{attachment_name}_#{column_name}", column_type, column_options)
column("#{attachment_name}_#{column_name}", column_type, **column_options)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did it break our CI or was it just failing on bundling?
Just curious how you find that has to be changed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was failed during the rake db:migrate on CI, so I found a failed migration with attachement type field and understood that it comes from paperclip.

end
end
end
Expand Down
6 changes: 3 additions & 3 deletions lib/paperclip/validators/attachment_content_type_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def validate_blacklist(record, attribute, value)
end

def mark_invalid(record, attribute, types)
record.errors.add attribute, :invalid, options.merge(:types => types.join(', '))
record.errors.add attribute, :invalid, **options.merge(:types => types.join(', '))
end

def allowed_types
Expand Down Expand Up @@ -80,8 +80,8 @@ module HelperMethods
# name +[attachment]_content_type+ to be able to use this validator.
def validates_attachment_content_type(*attr_names)
options = _merge_attributes(attr_names)
validates_with AttachmentContentTypeValidator, options.dup
validate_before_processing AttachmentContentTypeValidator, options.dup
validates_with AttachmentContentTypeValidator, **options.dup
validate_before_processing AttachmentContentTypeValidator, **options.dup
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/paperclip/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Paperclip
unless defined?(Paperclip::VERSION)
VERSION = "6.1.3".freeze
VERSION = "6.1.4".freeze
end
end