Rails: Render a View (not a partial) From Within a View

前端 未结 4 1320
一生所求
一生所求 2021-02-05 00:30

I have a controller that responds to both html and js. The html view renders the whole page (including the header and footer), while the <

4条回答
  •  迷失自我
    2021-02-05 01:18

    Like others have mentioned, rendering another non-partial view in another view is "Not the rails way", if however you still insist on doing it, one method is:

    <%= render :file => '' %>
    

提交回复
热议问题