method

expect!

rails latest stable - Class: ActionController::Parameters

Method not available on this version

This method is only available on newer versions. The first available version (v8.0.0) is shown here.

expect!(*filters)
public

Same as `expect`, but raises an `ActionController::ExpectedParameterMissing` instead of `ActionController::ParameterMissing`. Unlike `expect` which will render a 400 response, `expect!` will raise an exception that is not handled. This is intended for debugging invalid params for an internal API where incorrectly formatted params would indicate a bug in a client library that should be fixed.