Skip to content

Instantly share code, notes, and snippets.

View jystewart's full-sized avatar

James Stewart jystewart

View GitHub Profile
module PaperclipMigrations
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def add_paperclip_fields(table, prefix)
add_column table, "#{prefix}_file_name", :string
add_column table, "#{prefix}_content_type", :string