class ActionController::ParameterMissing

# => ActionController::ParameterMissing: param is missing or the value is empty: a
params.require(:a)
# => ActionController::ParameterMissing: param is missing or the value is empty: b
params.fetch(:b)
params = ActionController::Parameters.new(a: {})
Raised when a required parameter is missing.

def corrections # :nodoc:

:nodoc:
def corrections # :nodoc:
  @corrections ||= DidYouMean::SpellChecker.new(dictionary: keys).correct(param.to_s)
end

def initialize(param, keys = nil) # :nodoc:

:nodoc:
def initialize(param, keys = nil) # :nodoc:
  @param = param
  @keys  = keys
  super("param is missing or the value is empty: #{param}")
end