Exclude application layout in Rails 3 div

后端 未结 2 1950
逝去的感伤
逝去的感伤 2020-12-12 06:04

I\'m loading a template profile_messages as part of jQuery UI Tabs with Ajax. However when it loads, profile_messages inherits my site\'s applicati

2条回答
  •  情歌与酒
    2020-12-12 06:57

    Do you have a response format of JS defined in your controller? It shouldn't render the layout if it renders a JS response properly. Do your logs show "responding with JS format"?

    respond_to do |format|
      format.js
    end
    

    As mrbrdo mentioned, you can also do render :layout => false but it shouldn't be necessary if the JS response is being run properly.

提交回复
热议问题