Sha256: 8e76ee705db40a6714f09b1a7e9cd03b82e8a8a70723d0febd161db8a08415d5

Contents?: true

Size: 807 Bytes

Versions: 10

Compression:

Stored size: 807 Bytes

Contents

# frozen_string_literal: true

# This model represents the 'menu' content type in Contentful.  Any linked
# entries of the 'menu' content type will be resolved as instances of this class.
# It exposes #find, #find_by, and #find_all methods to query Contentful.
class Menu < WCC::Contentful::Model::Menu
  # 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 "name" attribute to always be camelized.
  # #          `@name` is populated by the gem in the initializer.
  # def name
  #   @name_camelized ||= @name.camelize(true)
  # end
end

Version data entries

10 entries across 10 versions & 2 rubygems

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