From bf0b9f351820b2c5351ca2afe8c78dbcc11e2166 Mon Sep 17 00:00:00 2001 From: Gabriel Engel Date: Thu, 17 Dec 2020 14:29:31 -0300 Subject: [PATCH 1/2] FIX for ruby 3.0 --- lib/paperclip/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/paperclip/schema.rb b/lib/paperclip/schema.rb index 40872d123..2ee71d2a2 100644 --- a/lib/paperclip/schema.rb +++ b/lib/paperclip/schema.rb @@ -24,7 +24,7 @@ def add_attachment(table_name, *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] || {}) - add_column(table_name, "#{attachment_name}_#{column_name}", column_type, column_options) + add_column(table_name, "#{attachment_name}_#{column_name}", column_type, *column_options) end end end From f0cfc4225b7238c861780afe9eb44ed0e15626cd Mon Sep 17 00:00:00 2001 From: Gabriel Engel Date: Thu, 17 Dec 2020 14:34:05 -0300 Subject: [PATCH 2/2] Update schema.rb --- lib/paperclip/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/paperclip/schema.rb b/lib/paperclip/schema.rb index 2ee71d2a2..d1cd07af0 100644 --- a/lib/paperclip/schema.rb +++ b/lib/paperclip/schema.rb @@ -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) end end end