lib/generators/wcc/templates/menu/menu_button.rb in wcc-contentful-0.1.0 vs lib/generators/wcc/templates/menu/menu_button.rb in wcc-contentful-0.2.0

- old
+ new

@@ -1,12 +1,10 @@ # frozen_string_literal: true -# This file reopens the "MenuButton" class which was dynamically -# created by the WCC::Contentful gem. This class does not need to do anything, -# the attributes have already been defined based on the `content_type` returned -# from the Contentful API. However you can reopen the class to add functionality. -class WCC::Contentful::Model::MenuButton < WCC::Contentful::Model - +# This model represents the 'menuButton' content type in Contentful. Any linked +# entries of the 'menuButton' content type will be resolved as instances of this class. +# It exposes #find, #find_by, and #find_all methods to query Contentful. +class MenuButton < WCC::Contentful::Model::MenuButton # 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