Sha256: aee1ed1d5a65503ab388c24f72448f9b8f6003c77907e08dc571a0c3c0953739

Contents?: true

Size: 296 Bytes

Versions: 45

Compression:

Stored size: 296 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration
  def self.up
    add_column :audits, :association_id, :integer
    add_column :audits, :association_type, :string
  end

  def self.down
    remove_column :audits, :association_type
    remove_column :audits, :association_id
  end
end

Version data entries

45 entries across 41 versions & 7 rubygems

Version Path
notifiably_audited-activerecord-1.0.0 lib/generators/notifiably_audited/templates/add_association_to_audits.rb
notifiably_audited-activerecord-0.1.15 lib/generators/notifiably_audited/templates/add_association_to_audits.rb
notifiably_audited-activerecord-0.1.14 lib/generators/notifiably_audited/templates/add_association_to_audits.rb
notifiably_audited-activerecord-0.1.12 lib/generators/notifiably_audited/templates/add_association_to_audits.rb
notifiably_audited-activerecord-0.1.11 lib/generators/notifiably_audited/templates/add_association_to_audits.rb
notifiably_audited-activerecord-0.0.7 lib/generators/audited/templates/add_association_to_audits.rb
notifiably_audited-0.0.6 lib/generators/audited/templates/add_association_to_audits.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/audited-activerecord-3.0.0/lib/generators/audited/templates/add_association_to_audits.rb
audited-activerecord-3.0.0 lib/generators/audited/templates/add_association_to_audits.rb
audited-activerecord-3.0.0.rc2 lib/generators/audited/templates/add_association_to_audits.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/acts_as_audited-2.1.0/lib/generators/acts_as_audited/templates/add_association_to_audits.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/audited-activerecord-3.0.0.rc1/lib/generators/audited/templates/add_association_to_audits.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/audited-activerecord-3.0.0.rc1/lib/generators/audited/templates/add_association_to_audits.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/acts_as_audited-2.1.0/lib/generators/acts_as_audited/templates/add_association_to_audits.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/audited-activerecord-3.0.0.rc1/lib/generators/audited/templates/add_association_to_audits.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/acts_as_audited-2.1.0/lib/generators/acts_as_audited/templates/add_association_to_audits.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/audited-activerecord-3.0.0.rc1/lib/generators/audited/templates/add_association_to_audits.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/acts_as_audited-2.1.0/lib/generators/acts_as_audited/templates/add_association_to_audits.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/acts_as_audited-2.1.0/lib/generators/acts_as_audited/templates/add_association_to_audits.rb
audited-activerecord-3.0.0.rc1 lib/generators/audited/templates/add_association_to_audits.rb