Skip to content

Instantly share code, notes, and snippets.

@Poincare
Created June 14, 2012 20:21
Show Gist options
  • Save Poincare/2932710 to your computer and use it in GitHub Desktop.
Save Poincare/2932710 to your computer and use it in GitHub Desktop.
<% ps = Post.where(:author => "Dhaivat Pandya", :blog => "Something",
:language => "English", :market => "developers")[0] %>
<% if ps.time_posted.nil? %>
Oops, using old system please revert.
<% end %>
<div id="times">
<span class="age"><%= Date.today - ps.time_posted %></span>
<span class="age_edited"><%= Date.today - ps.time_edited %></span>
</div>
<div id="post-<%= ps.id %>" data-id="<%= ps.post_id %>">
<div id="author">ps.author</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment