Sha256: 49c813e33feb3499f0ff08c1dfffc0840b4b9722794bbccb4edca910820ca6e8

Contents?: true

Size: 801 Bytes

Versions: 16

Compression:

Stored size: 801 Bytes

Contents

= New Feature

* A custom_block_results plugin has been added for custom handling
  of block results.  This allows routing blocks to return
  arbitrary objects instead of just String, nil, and false, and
  to have custom handling for them. For example, if you want to
  be able to have your routing blocks return the status code to use,
  you could do:

    plugin :custom_block_results

    handle_block_result Integer do |result|
      response.status_code = result
    end

    route do |r|
      200
    end

  While the expected use of the handle_block_result method is with
  class arguments, you can use any argument that implements an
  appropriate === method.

  The symbol_views and json plugins, which support additional block
  results, now use the custom_block_results plugin internally.

Version data entries

16 entries across 16 versions & 1 rubygems

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