All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- #14: Support nested parameters in Rails (@danielpuglisi)
- #11: Refresh dataset on every request in Rails apps (@chase439)
- #10: Fix syntax errors in a README example (@th-ad)
- Drop the deprecated 'mixin-style' API.
- Drop the deprecated middleware API. Middleware remains supported via
use Rack::Reducer::Middleware
.
- Update
Rack::Reducer.new
to instantiate a reducer, instead of reserving it for the old Middleware API. - Refer to
::new
intead of::create
in the docs. Note that::create
remains supported as an alias of::new
.
- Restore support for nested params hashes, missing since 1.1
- #6: Restore support for default filters when params are empty (danielpuglisi).
- Run rails-specific specs in a separate process to avoid polluting other specs.
- Improve performance by ~30% for requests with empty params, and by ~5% for requests with full params.
- Simplify documentation.
- Create a changelog
- Encourage instantiating a reducer on boot via ::create, instead of instantiating a new reducer on every request.
- Deprecate the "mixin-style" in favor of the new ::create API.
To keep using Rack::Reducer in your models, create a Reducer constant.
class MyModel MyReducer = Rack::Reducer.create(dataset, *filter_functions) end MyModel::MyReducer.call(params)
- Deprecate mounting Rack::Reducer as middleware via
use Rack::Reducer
. It still works, but to mount middleware in a way that will remain compatible with v2, changeuse Rack::Reducer
touse Rack::Reducer::Middleware
.
- Improve inline documentation: https://www.rubydoc.info/gems/rack-reducer
First public release