I'm trying to figure out how to use helpers files.
I have models for Project and Potential Use. The associations are:
accepts_nested_attributes_for :potential_uses, reject_if: :all_blank, allow_destroy: true
<%= potential_uses_for_viewer(@project) %>
if @current_user.id == @project.profile.user_id
You're receiving an argument
project in the helper but inside the helper method, you're trying to access
@project is nil inside the helper. You should use
if @current_user.id == project.profile.user_id render 'potential_uses/private_comments'