Sha256: 7c72054727c5028a6754316730d85d7844b5bc43a2c0f91fd3b74b345cc1de42
Contents?: true
Size: 470 Bytes
Versions: 30
Compression:
Stored size: 470 Bytes
Contents
class Bare27Content < ActiveRecord::Base include BareMigration # See #24 for a description of how we have to manually handle STI end class SetCommentPublishedFlag < ActiveRecord::Migration def self.up STDERR.puts "Setting published flag on each comment" Bare27Content.transaction do Bare27Content.find(:all, :conditions => "type = 'Comment'").each do |c| c.published = true c.save! end end end def self.down end end
Version data entries
30 entries across 30 versions & 1 rubygems