I am new to rails so go easy. I have created a blog with the ability to "vote" on a post by using a feature much like Facebook's "like". I am not using any authentication but would like to restrict voting on a particular post by IP. That is, once someone votes for a post, they cannot vote again (unless they reset their router of course).
I feel like this should be something I affect by modifying the votes or posts Model, but I fear it has to do with Sessions, which...I don't have any experience yet.
Let me know if you need me to post any code. Here is the votes controller.
class VotesController < ApplicationController
def create
@post = Post.find(params[:post_id])
@vote = @post.votes.create!(params[:vote])
respond_to do |format|
format.html { redirect_to @post}
format.js
end
end
end