- Avoid loading responses (and templates) lazily as they need to be registered in time
- Fix: app generator's handling of 404. @magneland Issue #10
- Fix: Getting started doc. @WilliamSnyders Issue #19
- Controller filters can now shortcut the request lifecycle flow by returning a
Response
:- If a before filter returns it, both the action and the after filters will be skipped (as well as any remaining filters in the before list)
- If an after filter returns it, any remaining after filters in the block will be skipped.
- There is no way for the action result to skip the :after filters.
- Refactored Controller module to properly used ActiveSupprt concerns. @jasonayre Issue #26
- Separated the controller module into a Controller concern and a separable Callbacks concern
- Controller filters (i.e. callbacks) can shortcut request lifecycle by returning a Response object:
- If a before filter returns it, both the action and the after filters will be skipped (as well as any remaining before filters)
- If an after filter returns it, any remaining after filters in the block will be skipped.
- There is no way for the action result to skip the :after filters.
- Fixes Issue #21
- Introduced
around
filters using blocks:- Around filters can be set wrapping any of the request stages (load, validate, action...) and might apply to only certain actions (i.e. exactly the same as the before/after filters)
- Therefore they supports the same attributes as
before
andafter
filters. The only difference is that an around filter block will get an extra parameter with the block to call to continue the chain.- See the Instances controller for examples.
- Fix: Change :created response template to take an optiona ‘location’ parameter (instead of a media_type one, since it doesn’t make sense for a 201 type response) Issue #26
- Make the system be more robust in error reporting when controllers do not return a String or a Response
- Fix: ValidationError not setting a Content-Type header. Issue #39
- Relaxed ActiveSupport version dependency (from 4 to >=3 )