027_set_comment_published_flag.rb
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:0k
源码类别:
Ajax
开发平台:
Others
- 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