So I've got
LanRole.where("lan_id = ?", requestable.id).each do |lan_role| %>
<% @lan_??? = Lan.find(lan_role.lan_id) %>
<li><a data-toggle="tab" href="#lan_info_<%= lan.id %>"><%= lan.name %> INFO</a></li>
Where ??? should be lan_role.id so that i can put it in the tab later
<div class="tab-content">
<div id="lan_info_<%= lan.id %>" class="tab-pane fade">
<h4><%= @lan_???.name %> INFO</h4>
etc
</div>
But I don't know how to make a variable variable name, sub it in there.
If it was a string, I could do
#{lan_role.id}
but it's not a string.
... I misread the error, it's on <div id="lan_info_<%= lan.id %>" class="tab-pane fade">
ActionView::Template::Error (undefined local variable or method `lan' for #<#<Class:0x007f7afb9e98a0>:0x007f7afb28aeb0>):
For "variable" variables:
But since you're making tabs, just have two loops, one for links and one for bodies: