Module: Roda::RodaPlugins::IndifferentParams

Defined in:
lib/roda/plugins/indifferent_params.rb

Overview

The indifferent_params plugin adds a params instance method which returns a copy of the request params hash that will automatically convert symbols to strings. Example:

plugin :indifferent_params

route do |r|
  params[:foo]
end

The params hash is initialized lazily, so you only pay the penalty of copying the request params if you call the params method.

Defined Under Namespace

Modules: InstanceMethods