title: respond_with returns unknown format - rails
body: <p>I am using through <code>AngularJS</code> to send some json, in the controller I have </p>
  
  <pre><code>respond_to :json
  
  def create
      respond_with Task.create(description: params[:description])
  end
  </code></pre>
  
  <p>the <code>tasks</code> is stored on the database, but then I get this message in my log</p>
  
  <pre><code>ActionController::UnknownFormat - ActionController::UnknownFormat:
    (gem) actionpack-4.0.0/lib/action_controller/metal/mime_responds.rb:372:in `retrieve_collector_from_mimes'
    (gem) actionpack-4.0.0/lib/action_controller/metal/mime_responds.rb:327:in `respond_with'
  </code></pre>
  
  <p>...</p>
  
  <p>I tried to add in my route <code>resources :tasks, :defaults =&gt; {:format =&gt; "js"}</code>. How can I handle this problem ? </p>