<% endpoints.each do |endpoint| %> <%= erb :endpoint, locals: { endpoint: endpoint, visible: (endpoint == current_endpoint) } %> <% end %>