Sha256: 016846ea1d03d09b2c659f42d35bb476f2bfcb5319678ffd95be137b6fac3416

Contents?: true

Size: 375 Bytes

Versions: 45

Compression:

Stored size: 375 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration
  def self.up
    rename_column :audits, :auditable_parent_id, :association_id
    rename_column :audits, :auditable_parent_type, :association_type
  end

  def self.down
    rename_column :audits, :association_type, :auditable_parent_type
    rename_column :audits, :association_id, :auditable_parent_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/rename_parent_to_association.rb
notifiably_audited-activerecord-0.1.15 lib/generators/notifiably_audited/templates/rename_parent_to_association.rb
notifiably_audited-activerecord-0.1.14 lib/generators/notifiably_audited/templates/rename_parent_to_association.rb
notifiably_audited-activerecord-0.1.12 lib/generators/notifiably_audited/templates/rename_parent_to_association.rb
notifiably_audited-activerecord-0.1.11 lib/generators/notifiably_audited/templates/rename_parent_to_association.rb
notifiably_audited-activerecord-0.0.7 lib/generators/audited/templates/rename_parent_to_association.rb
notifiably_audited-0.0.6 lib/generators/audited/templates/rename_parent_to_association.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/audited-activerecord-3.0.0/lib/generators/audited/templates/rename_parent_to_association.rb
audited-activerecord-3.0.0 lib/generators/audited/templates/rename_parent_to_association.rb
audited-activerecord-3.0.0.rc2 lib/generators/audited/templates/rename_parent_to_association.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/rename_parent_to_association.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/audited-activerecord-3.0.0.rc1/lib/generators/audited/templates/rename_parent_to_association.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/audited-activerecord-3.0.0.rc1/lib/generators/audited/templates/rename_parent_to_association.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/rename_parent_to_association.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/audited-activerecord-3.0.0.rc1/lib/generators/audited/templates/rename_parent_to_association.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/rename_parent_to_association.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/audited-activerecord-3.0.0.rc1/lib/generators/audited/templates/rename_parent_to_association.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/rename_parent_to_association.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/rename_parent_to_association.rb
audited-activerecord-3.0.0.rc1 lib/generators/audited/templates/rename_parent_to_association.rb