config/environments/development.rb
на весь проект:config.action_controller.action_on_unpermitted_parameters = :raise
config/environments/production.rb
.class ApiController < ApplicationController
# <<<< добавить
# Always raise errors on unpermitted parameters
ActionController::Parameters.action_on_unpermitted_parameters = :raise
# <<<<
end