We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 656fd02 + ca78ab1 commit 1bce9d6Copy full SHA for 1bce9d6
lib/jsonapi/utils/response/formatters.rb
@@ -22,7 +22,7 @@ def jsonapi_format_errors(data)
22
private
23
24
def active_record_obj?(data)
25
- data.is_a?(ActiveRecord::Base)|| data.singleton_class.include?(ActiveModel::Model)
+ defined?(ActiveRecord::Base) && (data.is_a?(ActiveRecord::Base) || data.singleton_class.include?(ActiveModel::Model))
26
end
27
28
def build_response_document(records, options)
0 commit comments