Permalink
Browse files

use mongo to test whether bill has votes?

  • Loading branch information...
1 parent 3611bda commit d420c5ea61df47d9b35207cc1a7553411a99c0db @twneale twneale committed Jun 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 site/templates/billy/web/public/bill.html
@@ -128,7 +128,7 @@ <h2 class="withTimeline">{{ metadata.name }} {{bill.type_string|title}} {{ bill.
</div>
<div class="fourCol colRt">
<h3>Votes</h3>
- {% if bill.votes_manager.has_votes %}
@twneale

twneale Jun 19, 2012

Contributor

@jamesturk This change means the view does two votes.find calls, though the first only calls .count on the cursor. Is this ok?

+ {% if bill.votes_manager.count %}
<ul class="largerList voteChart">
{% for vote in bill.votes_manager %}
{% include vote_preview_row_template %}

1 comment on commit d420c5e

Owner

jamesturk commented on d420c5e Jun 19, 2012

what is the actual query being done?

Please sign in to comment.