Skip to content

Commit

Permalink
Merge pull request #62 from SamMarkGoldman/no_active_record
Browse files Browse the repository at this point in the history
eliminate ActiveRecord as a dependency for errors
  • Loading branch information
tiagopog authored Apr 30, 2017
2 parents 656fd02 + ca78ab1 commit 1bce9d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jsonapi/utils/response/formatters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def jsonapi_format_errors(data)
private

def active_record_obj?(data)
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))
end

def build_response_document(records, options)
Expand Down

0 comments on commit 1bce9d6

Please sign in to comment.