Sha256: 75ce42cd91c2c38d6c5521a665c03b094e4ad5876409f989753b1bdf8f6200fb

Contents?: true

Size: 381 Bytes

Versions: 3

Compression:

Stored size: 381 Bytes

Contents

<%- if Rails.version.to_i > 4 -%>
class AddAttachmentFileToUploads < ActiveRecord::Migration[<%= Rails.version.to_f %>]
<%- else -%>
class AddAttachmentFileToUploads < ActiveRecord::Migration
<%- end -%>
  def self.up
    change_table :rails_pallet_uploads do |t|
      t.attachment :file
    end
  end

  def self.down
    remove_attachment :rails_pallet_uploads, :file
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails_pallet-2.3.2 lib/generators/rails_pallet/install/templates/add_attachment_file_to_uploads.rb.erb
rails_pallet-2.3.1 lib/generators/rails_pallet/install/templates/add_attachment_file_to_uploads.rb.erb
rails_pallet-2.3.0 lib/generators/rails_pallet/install/templates/add_attachment_file_to_uploads.rb.erb