Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show names of who voted for projects on finalist page. #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kaunartist
Copy link

No description provided.

names = "";
users.each_with_index do |user, index|
names << user.name
if index != users.size - 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd prefer an array of names here, and then we can render it as arr.join(", ") in the view.

@jcn
Copy link
Member

jcn commented Sep 7, 2014

I would suggest that we not display the voter names by default - I can imaging that lots of chapters would want this to be anonymous. Instead we should hide them all and then display them with a "show voters" button.

</tr>
<% @projects.each do |project| %>
<tr class="finalist" data-count="<%= project.vote_count %>" data-id="<%= project.id %>">
<td><%= link_to project.title, chapter_project_path(project.chapter, project) %></td>
<td><%= project.id %></td>
<td><%= project.vote_count %></td>
<td><%= project.vote_names %></td>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to get super heavy on a page with a lot of projects, so we probably want to do some eager loading on the page that loads the projects.

@frabcus
Copy link

frabcus commented Mar 4, 2015

I like the idea of this, so can chase up specific people who haven't voted yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants