Sha256: 67e7add7974c81e67819b9e0b90f01e479fc0bcdd44dde161f0f9045f7c9d801
Contents?: true
Size: 478 Bytes
Versions: 12
Compression:
Stored size: 478 Bytes
Contents
class <%= migration_name %> < ActiveRecord::Migration def self.up <% attachments.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 <% attachments.each do |attachment| -%> drop_table :<%= class_name.underscore %>_<%= attachment.pluralize %> <% end -%> end end
Version data entries
12 entries across 12 versions & 1 rubygems