title: Ajax is not working in my Rails app
body: <p>I have following code to make an ajax request to my controller's method to get the content type of the given url :</p>
  
  <pre><code>    $("#wiki_form_url").change(function () {
          $.ajax({
              type: "GET",
              url: "/wiki_forms/content",
              data: {
                  input_url: $("#wiki_form_url").val()
              },
              dataType: "text"
          }).done(function (data) {
                      // `data` contains the content-type
                      alert('Success');
                      console.log(data);
  //                    alert(data);
                  }).fail(function () {
                      alert("failed AJAX call");
                  });
      });
  </code></pre>
  
  <p>There is a method in my wiki_forms controller named content and inside that I am doing :</p>
  
  <pre><code>  def content
  
      req = open(params[:input_url])
      render :text =&gt; req.content_type
      puts  "type is : #{req.content_type}"
  
    end
  </code></pre>
  
  <p>in my route.rb file  I have :</p>
  
  <pre><code> match "/wiki_forms/content" =&gt; 'wiki_forms#content'
  </code></pre>
  
  <p>But, when I try to make the ajax request I get error. My console looks like this :</p>
  
  <pre><code>Started GET "/wiki_forms/content?input_url=http%3A%2F%2Fwww.ofdp.org%2Fbenchmark_indices%2F25" for 127.0.0.1 at 2013-03-28 14:08:42 -0400
  Processing by WikiFormsController#show as TEXT
    Parameters: {"input_url"=&gt;"http://www.ofdp.org/benchmark_indices/25", "id"=&gt;"content"}
    WikiForm Load (0.3ms)  SELECT "wiki_forms".* FROM "wiki_forms" WHERE "wiki_forms"."id" = ? LIMIT 1  [["id", "content"]]
  Completed 500 Internal Server Error in 3ms
  
  ActiveRecord::RecordNotFound (Couldn't find WikiForm with id=content):
    app/controllers/wiki_forms_controller.rb:23:in `show'
  </code></pre>
  
  <p>Why is show method is getting called here as I specified the content method in my ajax call? How to make this work ? Please help</p>
  
  <p><strong>EDIT_1 :</strong></p>
  
  <p><strong>rake routes</strong></p>
  
  <pre><code>        wiki_forms GET    /wiki_forms(.:format)          wiki_forms#index
                     POST   /wiki_forms(.:format)          wiki_forms#create
       new_wiki_form GET    /wiki_forms/new(.:format)      wiki_forms#new
      edit_wiki_form GET    /wiki_forms/:id/edit(.:format) wiki_forms#edit
           wiki_form GET    /wiki_forms/:id(.:format)      wiki_forms#show
                     PUT    /wiki_forms/:id(.:format)      wiki_forms#update
                     DELETE /wiki_forms/:id(.:format)      wiki_forms#destroy
                root        /                              wiki_forms#index
  wiki_forms_content        /wiki_forms/content(.:format)  wiki_forms#content
  </code></pre>