Affix/rpress

View on GitHub
app/views/tag/_post.html.erb

Summary

Maintainability
Test Coverage
<div class="blog-post">
    <h4 class="blog-post-title"><a href="/post/<%= p.post_slug %>"><%= p.post_title %></a></h4>
    <% begin %>
        <%= BlueCloth.new(p.post_body.slice(0..(p.post_body.index('<MORE>'))).tr("<", "")).to_html.html_safe %><br />
        <br /><a href='/post/<%= p.post_slug %>'>Continue Reading...</a><br />
    <% rescue %>
        <%= BlueCloth.new(p.post_body).to_html.html_safe %><br />
    <% end %>
    <hr>
    <small>
        <span class="fa fa-tags"></span> 
        <% p.tags.each do |t| %>
            <a class="badge" href="/tag/<%= t.tag_slug %>"><%= t.tag_name %></a>
        <% end %>
        <div class="pull-right blog-post-meta">
            <%= p.created_at %> <a href="/about/<%= p.author.username %>"><%= p.author.first_name %> <%= p.author.last_name %></a>
        </div>
    </small>
    <br />
</div>