Questions tagged [voting-system]

179 questions
1
vote
2 answers

voting system, relational db, sql query

I want to design voting system with two tables. First table contains candidates' index and name. The other one contains index, voter and candidate's index whom the voter support. One voter can support multiple candidates. I want a sql query that…
jerome
  • 91
  • 10
1
vote
1 answer

acts_as_votable using ip address

I want to allow users to vote on posts without signing up, and have the vote instead tied to their ip address. I tried following this post but I need some more clarification. this is the error im getting from the posts_controller undefined method…
DavidK
  • 299
  • 1
  • 6
  • 24
1
vote
1 answer

Implementing Schulze voting method in SciLab

I have to implement the Schulze method in SciLab. Unfortunately, I'm completely new to this tool and neither am I good at such kind of job. Could anyone advise something as to where to look for some examples and tools to do it as fast and easy as…
Vlad Stryapko
  • 1,035
  • 11
  • 29
1
vote
0 answers

PHP + mysql poll

I am working on a voting system. The uniqueness of the votes is assured because the user needs to be logged to vote and I keep a record for each vote as a (user, option) pair. A user can upvote, downvote, or unvote an option, similar to how…
icenac
  • 400
  • 4
  • 11
1
vote
0 answers

How to set a rules action to write vote/ratings

How can I set an action in rules to enter a value in voting or ratings? The voting rules module settings allow for voting to be an event, but not a reaction. I select "node:vote-results" as the data to enter. However I get an error message "The…
hrf
  • 75
  • 1
  • 7
1
vote
1 answer

How do I use acts_as_votable on a nested resource that's displayed within the view for another model? E.g. in a Q&A context

I have a Question model and an Answer model. In the Question Show view, I use a loop to display all answers to the given question. I want to enable voting on these answers. I'm using the acts_as_votable gem. Here's the error I'm getting when I load…
1
vote
1 answer

Django blog, up-down voting feature using github source

I'm trying to include a youtube like up and down voting feature for my blog. I have used pip install django-updown to install this to my project. I have followed all the instructions there. I have included updown to INSTALLED_APPS, included rating =…
nicki
  • 187
  • 1
  • 2
  • 11
1
vote
1 answer

Issues with update action using acts_as_votable

I'm currently getting the votes to hit the database but I'm now having issues getting the update action to work in my controller. The votes don't record with the update action but do without out it. However, I then get a missing template error for…
Mark Hustad
  • 169
  • 1
  • 14
1
vote
2 answers

How to change a specific button, without using the `this` command in jquery

Right now my website's voting system is working, except for the fact that when i like something, it'll change the color of the button (via the this.* commands in the jquery/javascript file), but then when i click on the opposing button [the dislike…
Jeromie Devera
  • 376
  • 2
  • 6
  • 21
1
vote
1 answer

Act as Votable - List who voted

I've been using the act as votable gem and so far it's been working great. However I'm wondering if there's a way to create a list of who voted on the votable item? Say I have a blog post that users can vote on. I'd like to be able to click on the…
div
  • 187
  • 5
  • 12
1
vote
2 answers

Rails. How to get stat column from votes table where user_id = current user

I have petition site. I building now the voting system, but thats don't work glad. To create only one vote per user I use this condition in view: <% if @post.votes.where(user_id: current_user.id).blank? %> It's return true if user do not vote for…
TheVic
  • 303
  • 6
  • 16
1
vote
1 answer

C++ voting program help (beginner)!

Im new at cpp and i try to train myself with a little voting program. You give in the parties and then the votes of the party. #include #include using namespace std; int main() { string sInput = " "; string sName1 = " "; …
user3393830
1
vote
1 answer

Using Karma in the thumbs_up gem

I used the thumbs_up gem to create a voting system for my Rails application (which is a Question/Answers application like Stack Overflow). The problem is that I want the karma of the user (who submits answers and questions) to be based on both…
1
vote
0 answers

How to setup a voting gem

How can I set a voting gem so it works as follows. I have the following models class User < ActiveRecord::Base has_many :questions end class Question < ActiveRecord::Base belongs_to :user has_many :answers end class Answer <…
Francis Chibaye
  • 125
  • 1
  • 1
  • 10
1
vote
1 answer

Voting system and PHP session is not working

I am developing a voting system in PHP with MySQL, in which user enter his choice through radio button and this will go in database. On same page, the percentage of user votes appears after clicking submit button. But the code does not work for more…