-
respond_with
now accepts a new kwargs called:render
which goes straight to therender
call after an unsuccessful post request. Usefull if for example you need to render a template which is outside of controller's path eg:respond_with resource, render: { template: 'path/to/template' }
verify_request_format!
is aliased toverify_requested_format!
now.- Implementing the
interpolation_options
method on your controller is deprecated in favor of naming itflash_interpolation_options
instead.
- Added the
verify_request_format!
method, that can be used as abefore_action
callback to prevent your actions from being invoked when the controller does not respond to the request mime type, preventing the execution of complex queries or creating/deleting records from your app.
- Fix rendering when using
ActionController::API
. (by @eLod) - Added API controller template for the controller generator. (by @vestimir)
- Added support for Rails 5.
- No longer automatically set the responders generator as many projects may use this gem as a dependency. When upgrading, users will need to add
config.app_generators.scaffold_controller :responders_controller
to their application. Theresponders:install
generator has been updated to automatically insert it in new applications
- Require
rails/railtie
explicitly before using it - Require
action_controller
explicitly before using it - Remove unnecessary and limiting
resourceful?
check that required models to implementto_#{format}
(such checks are responsibility of the rendering layer)
- Import
respond_with
and class-levelrespond_to
from Rails - Support only Rails ~> 4.2
Responders::LocationResponder
is now included by the default responder (and therefore deprecated)
- Support Rails 4.1.
- Allow callable objects as the location.
- Improve controller generator to work closer to the Rails 4 one, and make it compatible with strong parameters.
- Drop support for Rails 3.1 and Ruby 1.8, keep support for Rails 3.2
- Support for Rails 4.0 onward
- Fix flash message on destroy failure. Fixes #61
- Fix url generation for namespaced models
- Properly inflect custom responders names
- Fix bug with namespace lookup
- Disable namespace lookup by default
- Allow embedded HTML in flash messages
- Support Rails 3.1 onward
- Support namespaced engines
- Allow engine detection in generators
- HTTP Cache is no longer triggered for collections
:js
now sets theflash.now
by default, instead offlash
- Renamed
responders_install
generator toresponders:install
- Added
CollectionResponder
which allows you to always redirect to the collection path (index action) after POST/PUT/DELETE
- Added Railtie and better Rails 3 support
- Added
:flash_now
as option
- Added
Responders::FlashResponder.flash_keys
and default to[ :notice, :alert ]
- Added support to `respond_with(@resource, :notice => "Yes!", :alert => "No!")``
- Added
FlashResponder
- Added
HttpCacheResponder
- Added responders generators