Skip to content

Instantly share code, notes, and snippets.

@travisdmathis
Created November 12, 2013 20:27
Show Gist options
  • Select an option

  • Save travisdmathis/7438061 to your computer and use it in GitHub Desktop.

Select an option

Save travisdmathis/7438061 to your computer and use it in GitHub Desktop.
<% @recent_posts.each_with_index do |post| %>
<li class="list-group-item">
<% @title = post.title %>
<%= link_to @title, :action => "show", :id => post.id %>
</li>
<% end %>
Copy link
Copy Markdown

ghost commented Nov 12, 2013

                <% @recent_posts.eachdo |post| %>
                    <li class="list-group-item">
                        <%  post.title %>
                        <%= link_to posts, :action => "show", :id => post.id %>
                    </li>
                <% end %>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment