This commit is contained in:
Toks
2013-04-20 12:17:13 -04:00
parent 62dce3e779
commit 9d8330e905
2 changed files with 5 additions and 1 deletions

View File

@@ -28,6 +28,10 @@ class PostVersion < ActiveRecord::Base
q = q.where("post_id = ?", params[:post_id].to_i)
end
if params[:start_id].present?
q = q.where("id <= ?", params[:start_id].to_i)
end
q
end
end

View File

@@ -19,7 +19,7 @@
<tbody>
<% post_versions.each do |post_version| %>
<tr id="post-version-<%= post_version.id %>">
<td><%= link_to("#{post_version.post_id}.#{post_version.id}", post_path(post_version.post_id)) %></td>
<td><%= link_to(post_version.post_id, post_path(post_version.post_id)) %>.<%= link_to(post_version.id, post_versions_path(:search => {:start_id => post_version.id})) %></td>
<td><%= compact_time(post_version.updated_at) %></td>
<td>
<% if post_version.updater %>