Sha256: 5beac5ee27abb58dde82f570a9e97884e4ebc2a3641d8b51a741c46d7104e447

Contents?: true

Size: 307 Bytes

Versions: 114

Compression:

Stored size: 307 Bytes

Contents

class AddPulitzerContentElementTypes < ActiveRecord::Migration
  ELEMENT_TYPES = %w(Text Image Video)

  def up
    ELEMENT_TYPES.each do |type|
      Pulitzer::ContentElementType.create(name: type)
    end
  end

  def down
    Pulitzer::ContentElementType.where(name: ELEMENT_TYPES).destroy_all
  end
end

Version data entries

114 entries across 112 versions & 1 rubygems

Version Path
pulitzer-0.1.9 db/migrate/20150702150819_add_pulitzer_content_element_types.rb
pulitzer-0.1.8 db/migrate/20150702150819_add_pulitzer_content_element_types.rb
pulitzer-0.1.7 db/migrate/20150702150819_add_pulitzer_content_element_types.rb
pulitzer-0.1.6 db/migrate/20150702150819_add_pulitzer_content_element_types.rb
pulitzer-0.1.5 db/migrate/20150702150819_add_pulitzer_content_element_types.rb
pulitzer-0.1.4 db/migrate/20150702150819_add_pulitzer_content_element_types.rb
pulitzer-0.1.3 db/migrate/20150702150819_add_pulitzer_content_element_types.rb
pulitzer-0.1.2 db/migrate/20150702150819_add_pulitzer_content_element_types.rb
pulitzer-0.1.1 db/migrate/20150702150819_add_pulitzer_content_element_types.rb
pulitzer-0.1.0 db/migrate/20150702150819_add_pulitzer_content_element_types.rb
pulitzer-0.0.5 db/migrate/20150702150819_add_pulitzer_content_element_types.rb
pulitzer-0.0.4 db/migrate/20150702150819_add_pulitzer_content_element_types.rb
pulitzer-0.0.3 db/migrate/20150702150819_add_pulitzer_content_element_types.rb
pulitzer-0.0.2 db/migrate/20150702150819_add_pulitzer_content_element_types.rb