jeudi 19 novembre 2015

Rails Render a partial in partial with collection

I have a partial nested inside collection of partial. For example

<= render partial: "users/user", collection: @users, as: user %>

inside _user.html.erb partial, i am rendering another partial.

<%= render partial: "users/user_info", locals: {user: user}  %>

It works this way, but the problem is it is rendering _user_info.html.erb partial for each user object and taking time. How to avoid this? Any suggestions

Aucun commentaire:

Enregistrer un commentaire