In the view.html.erb:
<%= render @posts %>
In each _post.html.erb:
<%= render partial: ‘shared/block’, locals: { blockedcallsign:
post.callsign
} %>
In each _block.html.erb:
<%= button_to blockrelationships_path, class: ‘btn btn-default btn-xs’,
params: {
blocker_callsign: @callsign,
blocked_callsign: blockedcallsign
},
remote: true do %>
<% end %>
I get the error: undefined local variable or method 'blockedcallsign'
.
What’s wrong with the code?