Sha256: 05da6fd13c9da199233207dee5e77489f61e6bd60d798cd4598b1afd4bbf53f5

Contents?: true

Size: 244 Bytes

Versions: 16

Compression:

Stored size: 244 Bytes

Contents

class SetPageTypeToContentForEmptyFields < ActiveRecord::Migration
  def change
    Qbrick::Page.where( "page_type is NULL or page_type = ''" ).each do |page|
      page.update_attribute(:page_type, Qbrick::PageType::CONTENT)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
qbrick-2.7.1 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.7 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.6.10 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.6.9 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.6.8 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.6.7 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.6.6 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.6.5 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.6.4 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.6.3 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.6.2 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.6.1 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.6.0 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.5.2 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.5.1 db/migrate/17_set_page_type_to_content_for_empty_fields.rb
qbrick-2.5.0 db/migrate/17_set_page_type_to_content_for_empty_fields.rb