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.62.0 doc/release_notes/3.14.0.txt
roda-3.61.0 doc/release_notes/3.14.0.txt
roda-3.60.0 doc/release_notes/3.14.0.txt
roda-3.59.0 doc/release_notes/3.14.0.txt
roda-3.58.0 doc/release_notes/3.14.0.txt
roda-3.57.0 doc/release_notes/3.14.0.txt
roda-3.56.0 doc/release_notes/3.14.0.txt
roda-3.55.0 doc/release_notes/3.14.0.txt
roda-3.54.0 doc/release_notes/3.14.0.txt
roda-3.53.0 doc/release_notes/3.14.0.txt
roda-3.52.0 doc/release_notes/3.14.0.txt
roda-3.51.0 doc/release_notes/3.14.0.txt
roda-3.50.0 doc/release_notes/3.14.0.txt
roda-3.49.0 doc/release_notes/3.14.0.txt
roda-3.48.0 doc/release_notes/3.14.0.txt
roda-3.47.0 doc/release_notes/3.14.0.txt
roda-3.46.0 doc/release_notes/3.14.0.txt
roda-3.45.0 doc/release_notes/3.14.0.txt
roda-3.44.0 doc/release_notes/3.14.0.txt
roda-3.43.1 doc/release_notes/3.14.0.txt