so i've been playing around guys tutorials, takeing elements each 1 single app. https://mackenziechild.me/12-in-12/
in specific tutorial https://mackenziechild.me/12-in-12/7/ make categories rails console
now cause im adding on top of reddit clone, sidebar added in blog, cant copy paste application.html.erb (well uses haml in one, first 2 copied used erb, im sticking instead of rewriting everything)
my problem comes in tinkered categories in application.html 2 hours couldn't them nice, threw list tags on category line cause way figure out sorta worked
but want add in few more categories on top of existing 4, , list of categories gonna take room @ point, figure dropdown fine, cant figure out
in application.html got
<div id="content" class="col-md-9 center-block"> <% category.all.each |category| %> <li><%= link_to category.name, links_path(category: category.name) %></li> <% end %>
what can do?
select_tag "categories", options_from_collection_for_select(category.all, "id", "name")
you can learn more here.