0

I am new to rails and i want to make a whole row clickable with link_to. I am wondering what am I doing wrong with this code ? Nothing is clickable here. Do I have to use Javascript ? I would love some help.

      <% @courses.each do |course|%>
        <tr>
          <%= link_to managers_course_path(course) do %>
            <td class="name"><%= course.activity.name %></td>
            <td class="day"><%= course.starts_at.strftime("%A %e %B") %></td>
            <td class="start"><%= course.starts_at.strftime("%H:%M") %></td>
            <td class="end"><%= course.ends_at.strftime("%H:%M") %></td>
          <% end %>
        </tr>
      <% end %>
  • The permitted contents inside an `` is `Zero or more and/or elements; script-supporting elements ( – max Feb 11 '23 at 10:31
  • For the sake of accessibility you should just provide a normal link in a `` or not use a table. – max Feb 11 '23 at 10:32

0 Answers0