Module: ContentfulModel
- Defined in:
- lib/contentful_model.rb,
lib/contentful_model/base.rb,
lib/contentful_model/asset.rb,
lib/contentful_model/query.rb,
lib/contentful_model/client.rb,
lib/contentful_model/errors.rb,
lib/contentful_model/queries.rb,
lib/contentful_model/version.rb,
lib/contentful_model/manageable.rb,
lib/contentful_model/management.rb,
lib/contentful_model/asset_dimensions.rb,
lib/contentful_model/migrations/errors.rb,
lib/contentful_model/associations/has_one.rb,
lib/contentful_model/migrations/migration.rb,
lib/contentful_model/asset_dimension_query.rb,
lib/contentful_model/associations/has_many.rb,
lib/contentful_model/associations/belongs_to.rb,
lib/contentful_model/migrations/content_type.rb,
lib/contentful_model/validations/validations.rb,
lib/contentful_model/associations/associations.rb,
lib/contentful_model/associations/belongs_to_many.rb,
lib/contentful_model/associations/has_many_nested.rb,
lib/contentful_model/migrations/content_type_factory.rb
Overview
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.
Defined Under Namespace
Modules: AssetDimensions, Associations, Manageable, Migrations, Queries, Validations Classes: Asset, AssetDimensionQuery, AssociationError, Base, Client, Configuration, Management, Query, VersionMismatchError
Constant Summary collapse
- VERSION =
'1.1.0'.freeze
Class Attribute Summary collapse
-
.configuration ⇒ Object
access the configuration class as ContentfulModel.configuration.
-
.use_preview_api ⇒ Object
accessor to set the preview API for use instead of the production one.
Class Method Summary collapse
-
.configure {|configuration| ... } ⇒ Object
block for configuration.
Class Attribute Details
.configuration ⇒ Object
access the configuration class as ContentfulModel.configuration
16 17 18 |
# File 'lib/contentful_model.rb', line 16 def configuration @configuration end |
.use_preview_api ⇒ Object
accessor to set the preview API for use instead of the production one
13 14 15 |
# File 'lib/contentful_model.rb', line 13 def use_preview_api @use_preview_api end |
Class Method Details
.configure {|configuration| ... } ⇒ Object
block for configuration.
19 20 21 22 |
# File 'lib/contentful_model.rb', line 19 def configure self.configuration ||= Configuration.new yield(configuration) end |