Sha256: 342fbc695a6b30902ada828503c160819191b48ad16ffdc00b8fbe6e9993c56f
Contents?: true
Size: 454 Bytes
Versions: 10
Compression:
Stored size: 454 Bytes
Contents
class SiteClientAdminToManager < ActiveRecord::Migration class Relation::Admin < Relation; end def up admin = Relation::Admin.first if admin.present? rt = Tie.record_timestamps Tie.record_timestamps = false admin.ties.each do |t| t.relation = Relation::Manager.instance t.save! end Tie.record_timestamps = rt end end def down raise ActiveRecord::IrreversibleMigration end end
Version data entries
10 entries across 10 versions & 2 rubygems