I have this code:
<% @registered_friends.each do |friend| %>
<li><%= render 'profiles/fb_follow_form' %></li>
<% end %>
It renders a partial in a different directory with this line:
<% if current_user != nil && current_user.following?(friend) %>
However my app is telling me that friend is undefined? How do I give myself access to the variable?
Changing
<li><%= render 'profiles/fb_follow_form' %></li>to
<li><%= render 'profiles/fb_follow_form', :friend => friend %></li>should do it