Skip to content

Commit a278c32

Browse files
Gargronhiyuki2578
authored andcommitted
Fix 422 being returned instead of 404 when POSTing (mastodon#11574)
1 parent 50c3882 commit a278c32

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/controllers/application_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class ApplicationController < ActionController::Base
2929
before_action :store_current_location, except: :raise_not_found, unless: :devise_controller?
3030
before_action :require_functional!, if: :user_signed_in?
3131

32+
skip_before_action :verify_authenticity_token, only: :raise_not_found
33+
3234
def raise_not_found
3335
raise ActionController::RoutingError, "No route matches #{params[:unmatched_route]}"
3436
end

0 commit comments

Comments
 (0)