From: Eugen Rochko Date: Fri, 16 Aug 2019 00:08:35 +0000 (+0200) Subject: Fix 422 being returned instead of 404 when POSTing (#11574) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=6e872c6dabf12fdd2619d4042495e52edd6079bd;p=mastodon.git Fix 422 being returned instead of 404 when POSTing (#11574) --- diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0d3913ee0..66569561c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -29,6 +29,8 @@ class ApplicationController < ActionController::Base before_action :store_current_location, except: :raise_not_found, unless: :devise_controller? before_action :require_functional!, if: :user_signed_in? + skip_before_action :verify_authenticity_token, only: :raise_not_found + def raise_not_found raise ActionController::RoutingError, "No route matches #{params[:unmatched_route]}" end