lib/grape/dsl/inside_route.rb in grape-1.5.1 vs lib/grape/dsl/inside_route.rb in grape-1.5.2

- old
+ new

@@ -397,10 +397,10 @@ # @return [Class] the located Entity class, or nil if none is found def entity_class_for_obj(object, options) entity_class = options.delete(:with) if entity_class.nil? - # entity class not explicitely defined, auto-detect from relation#klass or first object in the collection + # entity class not explicitly defined, auto-detect from relation#klass or first object in the collection object_class = if object.respond_to?(:klass) object.klass else object.respond_to?(:first) ? object.first.class : object.class end