Commit 71adf38c by Henrik N

Don't require _content_type column, since sometimes you don't need it.

parent ce598d61
...@@ -113,7 +113,7 @@ module Paperclip ...@@ -113,7 +113,7 @@ module Paperclip
def has_attached_file name, options = {} def has_attached_file name, options = {}
include InstanceMethods include InstanceMethods
%w(file_name content_type).each do |field| %w(file_name).each do |field|
unless column_names.include?("#{name}_#{field}") unless column_names.include?("#{name}_#{field}")
raise PaperclipError.new("#{self} model does not have required column '#{name}_#{field}'") raise PaperclipError.new("#{self} model does not have required column '#{name}_#{field}'")
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment