Module: Paperclip::ClassMethods

Defined in:
lib/hobo_paperclip/init.rb

Instance Method Summary collapse

Instance Method Details

#has_attached_file_with_hobo(name, *args, &b) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/hobo_paperclip/init.rb', line 5

def has_attached_file_with_hobo(name, *args, &b)
  has_attached_file_without_hobo(name, *args, &b)

  fields do |f|
    f.field "#{name}_file_name",    :string
    f.field "#{name}_content_type", :string
    f.field "#{name}_file_size",    :integer
    f.field "#{name}_updated_at",   :datetime
  end

  declare_attr_type name, ::Paperclip::Attachment
end