From 17772cefd8a90fc1b54744871de1050a6040a691 Mon Sep 17 00:00:00 2001 From: Benjamin Fleischer Date: Wed, 20 Nov 2024 21:08:14 -0600 Subject: [PATCH] fix(rack 3): Fixes #1456 per #1457 (#1462) * fix(rack 3): Fixes #1456 per #1457 * ci: exclude incidental failure in old Ruby/Rails --- .github/workflows/tests.yml | 4 +++- lib/jsonapi/error.rb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b8e828a64..b322ef42a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,6 +25,8 @@ jobs: exclude: - ruby: 2.7.2 rails: 5.0.7.2 + - ruby: 2.6.6 + rails: 5.0.7.2 - ruby: 2.7.2 rails: 4.2.11 - ruby: 2.6.6 @@ -41,4 +43,4 @@ jobs: - name: Install dependencies run: bundle install --jobs 4 --retry 3 - name: Run tests - run: bundle exec rake test \ No newline at end of file + run: bundle exec rake test diff --git a/lib/jsonapi/error.rb b/lib/jsonapi/error.rb index 41545c13e..fc39d93aa 100644 --- a/lib/jsonapi/error.rb +++ b/lib/jsonapi/error.rb @@ -15,7 +15,7 @@ def initialize(options = {}) @source = options[:source] @links = options[:links] - @status = Rack::Utils::SYMBOL_TO_STATUS_CODE[options[:status]].to_s + @status = Rack::Utils.status_code(options[:status]).to_s @meta = options[:meta] end