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