Sha256: b19a36c02d572d76fa44d33b97638d7e52739a0a18753d52a469e413a90bc77d

Contents?: true

Size: 372 Bytes

Versions: 12

Compression:

Stored size: 372 Bytes

Contents

# This migration comes from pulitzer (originally 20150702150819)
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

12 entries across 12 versions & 1 rubygems

Version Path
pulitzer-0.1.7 test/dummy/db/migrate/20150716214850_add_pulitzer_content_element_types.pulitzer.rb
pulitzer-0.1.6 test/dummy/db/migrate/20150716214850_add_pulitzer_content_element_types.pulitzer.rb
pulitzer-0.1.5 test/dummy/db/migrate/20150716214850_add_pulitzer_content_element_types.pulitzer.rb
pulitzer-0.1.4 test/dummy/db/migrate/20150716214850_add_pulitzer_content_element_types.pulitzer.rb
pulitzer-0.1.3 test/dummy/db/migrate/20150716214850_add_pulitzer_content_element_types.pulitzer.rb
pulitzer-0.1.2 test/dummy/db/migrate/20150716214850_add_pulitzer_content_element_types.pulitzer.rb
pulitzer-0.1.1 test/dummy/db/migrate/20150716214850_add_pulitzer_content_element_types.pulitzer.rb
pulitzer-0.1.0 test/dummy/db/migrate/20150716214850_add_pulitzer_content_element_types.pulitzer.rb
pulitzer-0.0.5 test/dummy/db/migrate/20150716214850_add_pulitzer_content_element_types.pulitzer.rb
pulitzer-0.0.4 test/dummy/db/migrate/20150716214850_add_pulitzer_content_element_types.pulitzer.rb
pulitzer-0.0.3 test/dummy/db/migrate/20150716214850_add_pulitzer_content_element_types.pulitzer.rb
pulitzer-0.0.2 test/dummy/db/migrate/20150716214850_add_pulitzer_content_element_types.pulitzer.rb