I have and app with some question. My links are numbers 1,2,3 ect.
Each of this link is a path to another question. I made that visited link changes color but that option is not good. It's not good because when I once open that link it show it in color which I set for visited link. But when I delete from DB that question and add new it has again number 1 as link and it is shown as visited.
This is part of code where I have done that:
<% @categories.each do |category| %>
<div id=<%= "box#{category.id}" -%>>
<h1><%= category.name %></h1>
<% category.questions.each_with_index do |question, i| %>
<ul class="question-list" style="display: inline;">
<li><%= link_to (i + 1), show_path(question_id: question.id) %></li>
</ul>
<% end %>
This part look like this. below each category are questions.
Category
1 2 3 4
I do not want delete question from database. I only want to delete link.
So if I open question with number 1 and when I go back I want that this number 1 as link disappear and then I will have like this.
Category
2 3 4
Question: How to delete just link name after link is visited?