Table: RailsNotes
User: dreamable
Created at: 2021-02-06 00:20:31 UTC
Updated at: 2021-03-01 23:06:29 UTC
Reference:(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) %>
    
Tag: