require "ImageClip/version" module ImageClip def self.add_image(table_name, attachment_name) add_column(table_name, "#{attachment_name}_data", :text) add_attachment(table_name, attachment_name) # add code to model for saving end def self.remove_image(table_name, attachment_name) remove_column(table_name, "#{attachment_name}_data") remove_attachment(table_name, attachment_name) # remove code to model for saving end end