title: Live form validation using with jQuery/Coffee AJAX Rails
body: <p>Okey, so I have this problem... And I've had it for like weeks. I'm working on a school project and I'm supposed to make a live form validation using Ruby on rails and ajax (jQuery/Coffee). I've google my arse off and I've found loads and loads of plugins for it, but not one helpful tutorial. I've got some code together that seems legit, but I need help to make this code validate the form live, checking the database for email, username etc. It's for the sign up page so I think you get the idea.</p>
  
  <pre><code>$("#new_user").live "ajax:beforeSend", (event, xhr, status) -&gt;
          form = $(this)
          form.validate {
  
          # Validations goes here, but how do I write it?
  
          }
  
          false unless form.valid()
  </code></pre>
  
  <p>So I guess I'm suppose to write a controller to handle the validations through this jQuery. I'm really new to both Rails and Ajax, so please help me out here.</p>