阅读背景:

Rails控制器检查Turbolinks是否请求

来源:互联网 

I am developing a Ruby on Rails 4 application that is using the Turbolinks gem. I have noticed when a link is clicked the layout is still rendered server side but the Turbolinks JavaScript just grabs the body out of this rendered content. My question is on the controller side is it possible to determine if a request is made via Turbolinks or not. Essentially in the event a request is made via Turbolinks I want to set the layout to false as to not execute un-needed code. In my ApplicationController I already have the following code:I am developing a Ruby on Rails 4 application t




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: