lib/generators/wcc/templates/menu/menu.rb in wcc-contentful-0.1.0 vs lib/generators/wcc/templates/menu/menu.rb in wcc-contentful-0.2.0
- old
+ new
@@ -1,12 +1,10 @@
# frozen_string_literal: true
-# This file reopens the "Menu" 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::Menu < WCC::Contentful::Model
-
+# 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