From http://stackoverflow.com/questions/17559563/sending-ajax-post-jquery-in-rails-application