Sha256: 25a47c6ea543551b2cbeb2b8e8acc9301c63acbe90f4664eb7f682b1617f64f6

Contents?: true

Size: 393 Bytes

Versions: 18

Compression:

Stored size: 393 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
  def self.up
    change_table :<%= table_name %> do |t|
<% attachment_names.each do |attachment| -%>
      t.attachment :<%= attachment %>
<% end -%>
    end
  end

  def self.down
<% attachment_names.each do |attachment| -%>
    remove_attachment :<%= table_name %>, :<%= attachment %>
<% end -%>
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
kt-paperclip-7.2.2 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-7.2.1 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-7.2.0 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-6.4.2 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-5.4.0 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-7.1.1 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-7.1.0 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-7.0.1 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-7.0.0 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-6.4.1 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-6.4.0 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-6.3.0 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-6.2.2 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-6.2.1 lib/generators/paperclip/templates/paperclip_migration.rb.erb
kt-paperclip-6.2.0 lib/generators/paperclip/templates/paperclip_migration.rb.erb
paperclip-6.1.0 lib/generators/paperclip/templates/paperclip_migration.rb.erb
paperclip-6.0.0 lib/generators/paperclip/templates/paperclip_migration.rb.erb
paperclip-5.3.0 lib/generators/paperclip/templates/paperclip_migration.rb.erb