File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ def self.add_errors_renderer!
5656 end
5757
5858 details = { }
59- if ::Rails :: VERSION :: MAJOR >= 6 && :: Rails :: VERSION :: MINOR >= 1
60- resource . map do |error |
59+ if ::Rails . gem_version >= Gem :: Version . new ( '6.1' )
60+ resource . each do |error |
6161 attr = error . attribute
6262 details [ attr ] ||= [ ]
6363 details [ attr ] << error . detail . merge ( message : error . message )
Original file line number Diff line number Diff line change 5656 . to eq ( Rack ::Utils ::HTTP_STATUS_CODES [ 422 ] )
5757 expect ( response_json [ 'errors' ] [ 0 ] [ 'source' ] )
5858 . to eq ( 'pointer' => '/data/relationships/user' )
59- if Rails :: VERSION :: MAJOR >= 6 && Rails :: VERSION :: MINOR >= 1
59+ if Rails . gem_version >= Gem :: Version . new ( '6.1' )
6060 expect ( response_json [ 'errors' ] [ 0 ] [ 'detail' ] )
6161 . to eq ( 'User must exist' )
6262 else
You can’t perform that action at this time.
0 commit comments