Hey have method called voted? that sees if someone voted. Where would I put it so it can be used in both the controller and view? First thought about placing it in the Voting Records model but I can’t call current_user there. Then the project helper, but it fails there as well?
def voted?(project)
Project.votes.exists?( :project_id => project.id, :user_id => current_user.id )
end
Thanks
Have you considered this?
Now you can use the following anywhere, in controllers (keeping them skinny), in views keeping it neat.