Closed nettofarah closed 9 years ago
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @Thibaut (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.
You can reproduce this by creating a controller that inherits from ActionController::API
using both edge rails and edge turbolinks.
Thanks for the PR. We should set up CI with rails/master
so that we can add a test for this. I'll make the changes soon.
@Thibaut is there anything I can do on my end to help?
@nettofarah Not yet. I'll add CI with rails/master
over the week-end so we can write a test.
I set up CI with rails/master
but couldn't figure out a clean way to write a test either. :ship:
Thanks, Thibaut. On Sun, Sep 20, 2015 at 2:00 PM Thibaut Courouble notifications@github.com wrote:
Merged #606 https://github.com/rails/turbolinks/pull/606.
— Reply to this email directly or view it on GitHub https://github.com/rails/turbolinks/pull/606#event-414215496.
By adding this line we guarantee that the rails Engine won't include turbolinks modules into non regular controllers, such as
ActionController::API
(which happens to not support cookies).Including
Turbolinks
intoActionController
s that don't support cookies would cause requests to error out.ps: This could also be solved by just adding a
respond_to?(:cookies)
insideTurbolinks::Cookies#set_request_method_cookie
, but I believe my solution is a little cleaner.ps2: I can't really think of a decent way to write a test for this.