]> cat aescling's git repositories - mastodon.git/commitdiff
Fix 422 being returned instead of 404 when POSTing (#11574)
authorEugen Rochko <eugen@zeonfederated.com>
Fri, 16 Aug 2019 00:08:35 +0000 (02:08 +0200)
committerGitHub <noreply@github.com>
Fri, 16 Aug 2019 00:08:35 +0000 (02:08 +0200)
app/controllers/application_controller.rb

index 0d3913ee07daaa84df486980dfa147dfee0ee4be..66569561cb30166e2115691746e1f31076b1ad7f 100644 (file)
@@ -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