[Solved] Edited… ActionView::Template::Error (No route matches… missing required keys: [:comment_id])


Change the form action to this,
Updated:

<% if @photo.comments.any? %>
   <% @photo.comments.each do |comment| %>     
     # you do not have to use comment in form_for, because this form is for creating cflag
     <%= form_for(:cflag, url: photo_comment_cflags_path(@photo, comment), method: "post") do |f| %> 
          <%= f.hidden_field :user_id, value: current_user.id %> 
          <%= f.submit "Report Inappropiate" %> 
     <% end %> 
   <% end %> 
<% end %>

14

solved Edited… ActionView::Template::Error (No route matches… missing required keys: [:comment_id])