app/controllers/apicasso/crud_controller.rb in apicasso-0.3.1 vs app/controllers/apicasso/crud_controller.rb in apicasso-0.3.2
- old
+ new
@@ -180,10 +180,10 @@
end
# Parsed JSON to be used as response payload, with included relations
def include_relations
@records = JSON.parse(included_collection.to_json(include: parsed_include))
- rescue ActiveRecord::AssociationNotFoundError
+ rescue ActiveRecord::AssociationNotFoundError, ActiveRecord::ConfigurationError
@records = JSON.parse(@records.to_json(include: parsed_include))
end
# A way to SQL-include for current param[:include], only if available
def included_collection