Ich versuche, nur um die ID-Nummer selbst, anstatt das zu tun, so etwas zu einem bestimmten Datenbankelement zu verknüpfen:Wie nur durch ID-Nummer in Schienen link_to
<%= link_to locations_path(@location) do %>
<li class="border-top border-bottom">Location</li>
<% end %>
von Ich mag verlinkt die ID-Nummer manuell, etwas wie folgt aus:
<%= link_to locations_path(82) do %>
<li class="border-top border-bottom">Location</li>
<% end %>
Vielen Dank im Voraus!
Es funktioniert nicht? Oder was? Es ist unklar für mich, was du fragst. –
können Sie nicht nur 'locations_path (82)' verwenden? – PhilVarg
Dies ist, was ich bekomme, http: // localhost: 3030/locations.82 statt http: // localhost: 3030/locations/82 – halfacreyum