Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/few-seas-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/view-components": patch
---

Fix deprecation warning for Rails 9
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class << self
attr_accessor :last_request
end

rescue_from ActionController::InvalidAuthenticityToken, with: :handle_invalid_authenticity_token
rescue_from ActionController::InvalidCrossOriginRequest, with: :handle_invalid_cross_origin_request

before_action :reject_non_ajax_request

Expand All @@ -29,7 +29,7 @@ def create

private

def handle_invalid_authenticity_token
def handle_invalid_cross_origin_request
render status: :unauthorized, plain: "Bad CSRF token."
end

Expand Down
Loading