表单: RailsNotes
用户: dreamable
创建日期: 2021-02-06 00:20:31 UTC
更新日期: 2021-03-01 23:06:29 UTC
引用:(Table ID 3, Record ID 20)

标题 :
render collection
笔记 :
  1. loop method

    <% users.each do |user| %>
    <%= render user %>
    <% end %>
    
  2. render collection directly

    <= render @users %>
    
  3. view in other directory

    <= render (partial: 'home/user', collection: @users) %>
    
标签: