Sha256: c270a956bc7e5a394e1bc4f4442d15682d4f5e9d7538a600006bb8c33379a4c1

Contents?: true

Size: 1.08 KB

Versions: 71

Compression:

Stored size: 1.08 KB

Contents

= New Features

* The convert! and convert_each! methods in the typecast_params plugin
  now support a :raise option for handling missing parameters specified
  as arguments to the methods.
  
  If the :raise option is set to false for convert! and the parameter
  argument is missing, then no conversion is done and an empty hash
  is returned:

    typecast_params.convert!('missing', raise: false) do |tp|
      # ...
    end
    # => {}

  If the :raise option is set to false for convert_each! and a :keys
  option is given, any key not present is ignored and nil will be
  returned for the converted value

    typecast_params.convert_each!(:keys=>['present', 'missing'], raise: false) do |tp|
      tp.int('b')
    end
    # => [{'b'=>1}, nil]

= Other Improvements

* The :symbolize setting to the convert! and convert_each! methods in
  the typecast_params plugin is no longer persisted beyond the call
  to the method.  This fixes unexpected behavior if you do:

    typecast_params.convert!(:symbolize=>true) do |tp|
      # ...
    end
    typecast_params.convert! do |tp|
      # ...
    end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
roda-3.83.0 doc/release_notes/3.14.0.txt
roda-3.82.0 doc/release_notes/3.14.0.txt
roda-3.81.0 doc/release_notes/3.14.0.txt
roda-3.79.0 doc/release_notes/3.14.0.txt
roda-3.78.0 doc/release_notes/3.14.0.txt
roda-3.77.0 doc/release_notes/3.14.0.txt
roda-3.76.0 doc/release_notes/3.14.0.txt
roda-3.75.0 doc/release_notes/3.14.0.txt
roda-3.74.0 doc/release_notes/3.14.0.txt
roda-3.73.0 doc/release_notes/3.14.0.txt
roda-3.72.0 doc/release_notes/3.14.0.txt
roda-3.71.0 doc/release_notes/3.14.0.txt
roda-3.70.0 doc/release_notes/3.14.0.txt
roda-3.69.0 doc/release_notes/3.14.0.txt
roda-3.68.0 doc/release_notes/3.14.0.txt
roda-3.67.0 doc/release_notes/3.14.0.txt
roda-3.66.0 doc/release_notes/3.14.0.txt
roda-3.65.0 doc/release_notes/3.14.0.txt
roda-3.64.0 doc/release_notes/3.14.0.txt
roda-3.63.0 doc/release_notes/3.14.0.txt