1
我正在使用Boxy.js将我的/注册页面调用到模态窗口中。我想这是Ajax。当这种方式调用页面时,我希望页面不会与布局一起呈现。Boxy.js,XHR,Ruby on Rails
我想:
layout proc {|controller| controller.request.xhr? ? false: "application" }
和:
def render(*args)
args.first[:layout] = false if request.xhr? and args.first[:layout].nil?
super
end
在应用控制器,片段我GOOGLE了,但他们没有工作。 /注册仍然在布局中。
这里是头部的一部分时/注册由四四方方称为:
请求URL:http://本地主机:3000 /注册_ = 1301708866195
请求方法:GET
X -Requested-附:XMLHttpRequest的