0
votes

Working on building a blog tag list to show up on a rails project. I have a tags controller and working on a view named index.html.erb

Here is the code for that view:

<h1>
  All Tags
</h1>

<ul id="tags">
  <li><%= link_to tag.name, tag_path(tag), class: 'tag_title' %></li>
  <% end %>
</ul>

However, when I run the code on the server trying to pull the tags list, I get the following:

syntax error, unexpected keyword_ensure, expecting end-of-input

Any ideas?

2

2 Answers

1
votes

<% end %> is extra in your code

1
votes

it looks like you have a strangler end tag

1. <ul id="tags">
2.  <li><%= link_to tag.name, tag_path(tag), class: 'tag_title' %></li>
3.  <% end %>
4. </ul>

on line # 3. Just try to remove that