I'm new to rails, so easy. I created a blog with the ability to "vote" for a post using a feature similar to Facebook. I do not use authentication, but I want to limit the voting at a specific post by IP. That is, as soon as someone votes for a message, they cannot vote again (unless they reset their router, of course).
I feel that it must be something that I touch upon, changing the voices or messages of the Model, but I am afraid that it is connected with Sessions, which ... I have no experience yet.
Let me know if you need me to post any code. Here is the voice 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