lib/wcc/contentful/test/attributes.rb in wcc-contentful-1.0.8 vs lib/wcc/contentful/test/attributes.rb in wcc-contentful-1.1.0
- old
+ new
@@ -29,13 +29,9 @@
end
##
# Get a hash of default values for all attributes unique to the given Contentful model.
def defaults(const)
- unless const < WCC::Contentful::Model
- raise ArgumentError, "#{const} is not a subclass of WCC::Contentful::Model"
- end
-
const.content_type_definition.fields.each_with_object({}) do |(name, f), h|
h[name.to_sym] = h[name.underscore.to_sym] = default_value(f)
end
end