class Sinatra::Base

def indifferent_params(params)

Enable string or symbol key access to the nested params hash.
def indifferent_params(params)
  params = indifferent_hash.merge(params)
  params.each do |key, value|
    next unless value.is_a?(Hash)
    params[key] = indifferent_params(value)
  end
end