Module: Turbolinks::Redirect::Concern
- Defined in:
- lib/turbolinks/redirect.rb
Overview
All methods that will be included in ActionController::Base.
Instance Method Summary collapse
-
#redirect_to(options = {}, response_status = {}) ⇒ Object
Override #redirect_to to automatically respond with a status of :turbolinks if this request is AJAX.
Instance Method Details
#redirect_to(options = {}, response_status = {}) ⇒ Object
Override #redirect_to to automatically respond with a status of :turbolinks if this request is AJAX.
24 25 26 27 28 29 30 |
# File 'lib/turbolinks/redirect.rb', line 24 def redirect_to( ={}, response_status={} ) if request.xhr? super , response_status.merge( :status => :turbolinks ) else super end end |