Can i render :partial a view without leading underscore?

后端 未结 3 687
梦如初夏
梦如初夏 2021-02-05 01:18

i am facing a precarious condition here. I need to partially render a page that does not have a leading underscore.

<%= render(:partial => \"contact\" ,:co         


        
3条回答
  •  庸人自扰
    2021-02-05 02:10

    You should not try to bypass the conventions if not really necessary. I guess contact.html.erb contains a form. Put this into app/views/home/_contact.html.erb and render it in app/views/home/contact.html.erb.

    Or as fl00r answered:

    <%= render :file => '/homes/contact' %>
    

提交回复
热议问题