ruby on rails - Retrieving the correct model id -
i'm attempting edit data model, keeps listing user id instead of own id. why that?
<% provide(:title, 'activations') %> <div class="row"> <div class="col-md-8"> <% if @user.activations.present? %> <h3>activations (<%= @user.activations.count %>)</h3> <ol class="activations"> <%= render @activation %> </ol> <%= will_paginate @activation %> <% end %> </div> </div> </div>
this part of partial being rendered
<span class="user"><%= link_to activation.id, edit_activation_path %></span>
i've tried passing edit_activation_path(params[:id])
the activation id being listed correctly, don't know how set edit path id activation model.
thank help.
try passing model object link helper.
edit_activation_path(activation)
.
Comments
Post a Comment