title: How to return false if custom jQuery validation method is passing?
body: <p>I created own validation, which is made using json - action is sending response if user email is not unique. Here is action:</p>
  
  <pre><code>def checkemail
   respond_to do |format|
    format.jsonr do
      if User.where(email: params[:email]).exists? 
        render :json =&gt; {
              :status  =&gt; :false,
              }.to_json
      else
        render :json =&gt; {
              :status  =&gt; :true,
              }.to_json
       end
      end
    end
  end
  </code></pre>
  
  <p>Second variant(<b> don't know how to use </b>)</p>
  
  <pre><code>   def checkemail
     render :nothing
      if User.where(email: params[:email]).exists? 
        return false
      else
        true
      end
    end
  </code></pre>
  
  <p><b>I want to write a custom jQuery validation method, and here is code</b>:</p>
  
  <pre><code>   $.validator.addMethod("uniqueness", function(value) {
      $.getJSON('http://127.0.0.1:3000/checkemail.jsonr', { email: $('#email').val() }, function(data)  {
         return data.status
      });
  }, 'Your email is not unique');
   .....
   "user[email]":{         //here is no error in name
      uniqueness: true
          },
  </code></pre>
  
  <p><b>Also tried</b></p>
  
  <p>and it constatly tells me that email is not unique. </p>
  
  <p>I think, I'm constanlty sending true in my custom validation method. </p>
  
  <p><b>Where is my error ?</b></p>