Voting

Allow for AJAXy voting on comments and articles. Resolves #14.


![](http://zippy.gfycat.com/ImpracticalPastCardinal.gif)
Ah that makes sense. We can most definitely infer the class name based on the controller name -- something like `params[:controller].singularize.classify.constantize` would return the proper class. I would still recommend checking that `params[:controller].singularize` is a valid votable type.  What do you think the code would look like if we knew that we could use `params[:controller]` to get the class name and `params[:id]` to get the votable's id?