Complete the code to render a partial named '_item.html.erb'.
<%= render [1] %>In Rails, to render a partial named '_item.html.erb', you use render 'item'.
Complete the code to pass a local variable named 'item' to the partial.
<%= render 'item', [1]: {item: @item} %>
To pass local variables to a partial, use the locals option with a hash.
Fix the error in passing a local variable named 'user' to the partial.
<%= render 'profile', locals: [1] %>
The locals option expects a hash with keys as variable names and values as their values, like {user: user}.
Fill the blank to pass two local variables 'post' and 'comments' to the partial.
<%= render 'post', [1]: {post: post, comments: comments} %>
Use the locals option once with a hash containing all local variables.
Fill the blank to render a partial with local variables 'article', 'author', and 'tags'.
<%= render 'article', [1]: {article: article, author: author, tags: tags} %>
locals option.The locals option is used with a hash of local variables. The variables are keys and values in the hash.