Sha256: 9c25e92f2394dbaec17dc0e76d41bacf80b1343bef9f684c8d35c2a1fd349fbe

Contents?: true

Size: 808 Bytes

Versions: 8

Compression:

Stored size: 808 Bytes

Contents

# frozen_string_literal: true

# This model represents the 'page' content type in Contentful.  Any linked
# entries of the 'page' content type will be resolved as instances of this class.
# It exposes #find, #find_by, and #find_all methods to query Contentful.
class Page < WCC::Contentful::Model::Page
  # Add custom validations to ensure that app-specific properties exist:
  # validate_field :foo, :String, :required
  # validate_field :bar_links, :Array, link_to: %w[bar baz]

  # Override functionality or add utilities
  #
  # # Example: override equality
  # def ===(other)
  #   ...
  # end
  #
  # # Example: override "title" attribute to always be titlecase.
  # #          `@title` is populated by the gem in the initializer.
  # def title
  #   @title_titlecased ||= @title.titlecase
  # end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
wcc-contentful-app-0.4.0.pre.rc lib/generators/wcc/templates/page/models/page.rb
wcc-contentful-app-0.4.0.pre.alpha lib/generators/wcc/templates/page/models/page.rb
wcc-contentful-0.3.0 lib/generators/wcc/templates/page/models/page.rb
wcc-contentful-app-0.3.0.pre.rc3 lib/generators/wcc/templates/page/models/page.rb
wcc-contentful-app-0.3.0.pre.rc2 lib/generators/wcc/templates/page/models/page.rb
wcc-contentful-app-0.3.0.pre.rc lib/generators/wcc/templates/page/models/page.rb
wcc-contentful-app-0.2.2 lib/generators/wcc/templates/page/models/page.rb
wcc-contentful-0.2.2 lib/generators/wcc/templates/page/models/page.rb