Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix TODO about changing saved_search.commits to not return a page num…

…ber.
  • Loading branch information...
commit fb110cfe0b14689f2f1856c138907f6f09c1367e 1 parent 7667f05
@lyahdav lyahdav authored
Showing with 2 additions and 5 deletions.
  1. +1 −2  models/saved_search.rb
  2. +1 −3 views/_saved_search.erb
View
3  models/saved_search.rb
@@ -22,8 +22,7 @@ def commits(token = nil, direction = "before", min_commit_date)
self.method(:select_commits_currently_in_db).to_proc,
:after => min_commit_date,
:limit => PAGE_SIZE)
- page = (result[:count] / PAGE_SIZE).to_i + 1
- [result[:commits], page, result[:tokens]]
+ [result[:commits], result[:tokens]]
end
# True if this saved search's results include this commit.
View
4 views/_saved_search.erb
@@ -8,9 +8,7 @@
%>
<%
min_commit_date = Time.now - 60 * 60 * 24 * current_user.saved_search_time_period
- # TODO(philc): change saved_search_time_period.commits to not return a page number any more. We now keep
- # track of the current page number on the client.
- commits, ignored_page, tokens = saved_search.commits(token, direction, min_commit_date)
+ commits, tokens = saved_search.commits(token, direction, min_commit_date)
from = tokens[:from]
to = tokens[:to]
%>
Please sign in to comment.
Something went wrong with that request. Please try again.