Open jpslav opened 13 years ago
I think that would all that we would vote for, unless you want a thumbs up/down for the website in it's entirety.
This seems ok, let me try to do this issue
Take a look at all the "votable" stuff in routes.rb and in the solutions.
thanks I will take a look at them
do you want to be able to vote on individual question parts of multipart questions?
I would say just allow voting on the questions themselves (not the question_part objects) if they are published. You would have to change the multipart UI to make this easier for the user.
Let's see what JP thinks.
mkay, for not I will just do the questions themselves It also seems like comments already have voting implemented
Just vote on multiparts as a whole, not the individual parts.
Voting on comments really doesn't work?
On May 30, 2012, at 10:55 AM, zapcannon99 wrote:
except that the voting on comments doesn't work....
Reply to this email directly or view it on GitHub: https://github.com/lml/quadbase/issues/12#issuecomment-6013590
well for some reason I get a red bar saying "user has already been taken" what's that supposed to mean?
I was logged on as Alice btw all the other users seem to work
It seems to be complaining about the validation:
validates_uniqueness_of :user_id, :scope => :votable_id
in vote.rb
We probably want to keep this validation (one vote per user per votable), so if you can figure out why it's failing.
sure thing
I think you shouldn't even be allowed to click thumbs up or down if you've already voted. So the validation check in the model is correctly preventing you from voting again, but we should change the UI so that you can't even try to vote again (gray out the thumbs, etc).
The vote methods are supposed to automatically update any existing votes when used or create a new vote if it doesnt exist. So it's strange that the vote created that way would fail this validation.
I can't write tests for views right?
Validation occurs in the model, so unit tests should test that.
You can't test how a view "looks" in a test, but you can test that it renders at all in a functional (controller) test. If the view fails to render, the functional test should fail.
imo 1) I like voting on individual questions, because somewhile the question may be great as a whole, a single part can suck. In addition, if someone imports another question, the voting is carried over. However, I see the merit in only having the main part having the voting. 2) I'm wishy washy, so I like being able to change my vote
Things to add, since we have voting for questions, we should probably add a column that shows the likes/dislikes on the side when searching for questions
^^^^^ my late opinion
then I'll be running some tests then
I think we already have votes for solutions. We also want votes for published questions and comments. Others?