contentful / contentful_model

A lightweight wrapper around the Contentful api gem, to make it behave more like ActiveRecord
MIT License
44 stars 42 forks source link

Add support for rich_text field #127

Closed timfjord closed 5 years ago

timfjord commented 5 years ago

Currently, there is no way to define a rich_text field via migration. This PR adds support for that

class CreateFooContentType < ActiveRecord::Migration
  include ContentfulModel::Migrations::Migration

  def up
    create_content_type('foo') do |ct|
      ct.field('bar', :rich_text)
    end
  end

  def down
  end
end
dlitvakb commented 5 years ago

Thanks for the contribution! Merging!