title: Attributes is missing (grape API)
body: <p>I'm newbie in Rails. I tried to write a small API Rails application use <code>gem grape</code>.</p>
  
  <p>I followed up this tutorial <a href="http://www.sitepoint.com/build-great-apis-grape/" rel="nofollow">http://www.sitepoint.com/build-great-apis-grape/</a></p>
  
  <p>But when i tried to create a new record, i had an error as:
  <code>{"error":"type_id is missing"}</code></p>
  
  <p>Here is my code:</p>
  
  <p><code>singers.rb</code></p>
  
  <pre><code>module V1
   class Singers &lt; Grape::API
    resource :singers do
      desc "List all singers"
      get do
        Singer.all
      end
  
      desc "Create a new singer"
      params do
        requires :name, type: String
        requires :type_id, type: Integer
      end
  
      post do
        Singer.create!({
         name: params[:name],
         type_id: params[:type_id]
        })
      end
    end
   end
  end
  </code></pre>
  
  <p>And when i type in console as:
  <code>curl http://localhost:3000/api/v1/singers.json -d "name=khanhpn;type_id=1"</code></p>
  
  <p>I had an error: <code>{"error":"type_id is missing"}</code></p>
  
  <p>I didn't understand why it throw error. Hope everybody can explain for me. Thank you very much. </p>
  
  <p>This is my code which i pushed on bitbucket:
  <a href="https://bitbucket.org/baran19901990/grape_api/src/b8a0d676f17de3fedc95cc7efff60fab5afb0fc1/app/api/v1/singers.rb?at=master&amp;fileviewer=file-view-default" rel="nofollow">https://bitbucket.org/baran19901990/grape_api/src/b8a0d676f17de3fedc95cc7efff60fab5afb0fc1/app/api/v1/singers.rb?at=master&amp;fileviewer=file-view-default</a></p>
  
  <p>Solutions:</p>
  
  <p><code>curl -X POST http://localhost:3000/api/v1/singers -d "name=khanhpn&amp;type_id=1"</code></p>