Module: ContentfulModel::Associations
- Included in:
- Base
- Defined in:
- lib/contentful_model/associations/associations.rb,
lib/contentful_model/associations/has_one.rb,
lib/contentful_model/associations/has_many.rb,
lib/contentful_model/associations/belongs_to.rb,
lib/contentful_model/associations/belongs_to_many.rb,
lib/contentful_model/associations/has_many_nested.rb
Overview
A module to map relationships, a little like ActiveRecord::Relation This is necessary because Contentful::Link classes are not 2-way, so you can’t get the parent from a child.
Defined Under Namespace
Modules: BelongsTo, BelongsToMany, HasMany, HasManyNested, HasOne
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/contentful_model/associations/associations.rb', line 12 def self.included(base) base.include HasMany base.include HasOne base.include BelongsTo base.include BelongsToMany base.include HasManyNested end |