<hr>
<h3>Notes</h3>
<% @page.notes.each do |note| %>
  <p>
    <%= note.body %>
    <%= link_to "edit", edit_note_path(note) if note.user == current_user %>
    <%= link_to "delete", note, :method => :delete, :confirm => "Are you sure?" if note.user == current_user %>
    <br>
    <i>by: <%= link_to(note.user.display_name, { :controller => "user", :action => "profile", :user_id => note.user.id }) %></i>
  </p>
<% end %>

<hr>
<h3>Notes</h3>
<% @page.notes.each do |note| %>
  <p>
    <%= note.body %>
    <%= link_to "edit", edit_note_path(note) if note.user == current_user %>
    <%= link_to "delete", note, :method => :delete, :confirm => "Are you sure?" if note.user == current_user %>
    <br>
    <i>
    	by: <%= link_to(note.user.display_name, { :controller => "user", :action => "profile", :user_id => note.user.id }) %>
    	<%= time_ago_in_words(note.created_at)%>  ago
    </i>
  </p>
<% end %>

Add relative time to comments on pages
Add relative time to comments on pages
