铁轨。自动重新加载没有布局的容器

时间:2018-10-21 06:13:26

标签: jquery ruby-on-rails

我的控制器:

class TestrunsController < ApplicationController
  layout nil

  def show
  end
end

我的show.html.slim:

#container
    table.table.table-striped.table-bordered
        ....
    -unless request.xhr?
        javascript:
              $(function () {
                  intervalId = setInterval(function () {
                      $('#container').load(location.href);
                  }, 3000);
              })
= link_to 'Back', model_path

在容器中重新加载后,我得到了整页的页脚和“返回”链接。所以我在页面上有2个页脚。我该如何解决?

0 个答案:

没有答案