module ContentfulModel

ContentfulModel is an ActiveModel-like interface for the Contentful SDK.

A module to validate entries. A little like ActiveRecord. We don't think this should be necessary, really, because Contentful should be doing the validating, but they expose invalid entries through the preview API.

Constants

VERSION

Attributes

configuration[RW]

access the configuration class as ContentfulModel.configuration

use_preview_api[RW]

accessor to set the preview API for use instead of the production one

Public Class Methods

configure() { |configuration| ... } click to toggle source

block for configuration.

# File lib/contentful_model.rb, line 19
def configure
  self.configuration ||= Configuration.new
  yield(configuration)
end