Sha256: 1e12dccf8d9f1d711152f196baaae1d65441a4abba43aefbfe304446b6103708
Contents?: true
Size: 358 Bytes
Versions: 10
Compression:
Stored size: 358 Bytes
Contents
class AddPublishedAsToPosts < ActiveRecord::Migration def self.up add_column :posts, :published_as, :string, :limit => 16, :default => 'draft' # update all existing posts # Nope: not here. Do it in a rake task if you want. # Post.update_all("published_as = 'live'") end def self.down remove_column :posts, :published_as end end
Version data entries
10 entries across 10 versions & 1 rubygems