阅读背景:

使用response_to在RoR 2.x中使用ajax进行适度降级

来源:互联网 

I was going through the AWDR book on web development with ruby on rails and one of the issues with the old code was it didn't use respond_to to make sure the view used would be the javascript view. Now in some updated examples I've seen people mention they later, when implementing graceful degradation, use request.xhr? to tell if the user has javascript enabled, and if not they redirect the user. I was going through the AWDR book on web develo




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

分享到: