Sha256: e12e44de93eadb75ce21fab4c67cecac0e117d94249c4c63ca7fcbe65ffe0897
Contents?: true
Size: 494 Bytes
Versions: 12
Compression:
Stored size: 494 Bytes
Contents
class <%= migration_class_name %> < ActiveRecord::Migration def self.up <% attachment_names.each do |attachment| -%> create_table :<%= class_name.underscore %>_<%= attachment.pluralize %> do |t| t.integer :<%= class_name.underscore %>_id t.string :style t.binary :file_contents end <% end -%> end def self.down <% attachment_names.each do |attachment| -%> drop_table :<%= class_name.underscore %>_<%= attachment.pluralize %> <% end -%> end end
Version data entries
12 entries across 12 versions & 1 rubygems