title: My ajax call doesn't understand Rails routes path
body: <p>I have a problem with Rails and Ajax (I'm a beginner). </p>
  
  <p>I have a very large form, and inside this form I have some buttons.</p>
  
  <p>I need to attach an ajax call on these buttons: when i click I need to pass some parameters to the controller and I must then save this parameters in my model.</p>
  
  <p>I create the route and the controller method, but my script doesn't recognize the rails route path.</p>
  
  <pre><code>$("#crop_square").click (e) -&gt;
      $.ajax
        url: save_crop_data_admin_article_path
        type: "POST"
        data: "test"
        success: (data, textStatus, jqXHR) -&gt;
  
  
        error: (jqXHR, textStatus, errorThrown) -&gt;
  
  
      #if fails      
      e.preventDefault()
  </code></pre>