Temporarily add extra debugging to help with strong parameters

This commit is contained in:
Matt-Yorkley
2019-12-23 12:23:46 +01:00
parent f5bc120fb1
commit eae7dc7f2e
2 changed files with 12 additions and 0 deletions

View File

@@ -32,6 +32,12 @@ module Api
use_renderers :json
check_authorization
# Temporary measure to help debugging strong_parameters
rescue_from ActiveModel::ForbiddenAttributesError, with: :print_params
def print_params
raise ActiveModel::ForbiddenAttributesError, params.to_s
end
def set_jsonp_format
return unless params[:callback] && request.get?

View File

@@ -10,6 +10,12 @@ class ApplicationController < ActionController::Base
include EnterprisesHelper
include Spree::AuthenticationHelpers
# Temporary measure to help debugging strong_parameters
rescue_from ActiveModel::ForbiddenAttributesError, with: :print_params
def print_params
raise ActiveModel::ForbiddenAttributesError, params.to_s
end
def redirect_to(options = {}, response_status = {})
::Rails.logger.error("Redirected by #{begin
caller(1).first