public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
yaroslav (author)
Sun May 11 04:06:30 -0700 2008
commit  33a730791242bb12b2bcd8cfab0a59e2b750b725
tree    1d883f402575865a5d3bf8ea2cbf9a920812966a
parent  bc58c2c800ee1bb8e33b4054e8565ce7e19ee8fa
mephisto / db / migrate / 017_fix_filters.rb
100644 11 lines (9 sloc) 0.453 kb
1
2
3
4
5
6
7
8
9
10
11
class FixFilters < ActiveRecord::Migration
  def self.up
    Site.find(:all).each { |s| s.update_attributes :filters => [] unless s.filters.to_s =~ /_filter/ }
    User.find(:all).each { |u| u.update_attributes :filters => [:textile_filter] unless u.filters.to_s =~ /_filter/ }
    Article.find(:all).each { |a| a.update_attributes :filters => [:textile_filter] unless a.filters.to_s =~ /_filter/ }
  end
 
  def self.down
  end
end