title: When JSON data posted in rails throws param is missing or the value is empty: stall
body: <p>I have been trying post JSON data via POSTMAN but I get "param is missing or the value is empty: stall". Can someone please tell me where I'm going wrong?</p>
  
  <pre><code> def create 
    @stall = Stall.new(stall_params)
  
         if @stall.save
           render json: @stall, status: :created
         else
             render json: @stall.errors, status: :unprocessable_entity
      end 
   end
  
  
  
  private
  def stall_params
    params.require(:stall).permit(:name, :place)
  end
  </code></pre>
  
  <p>My Table contains only two columns name and place</p>
  
  <p>Below is the log</p>
  
  <pre><code>Processing by API::V1::StallsController#create as JSON
    Parameters: {"name"=&gt;"trill", "place"=&gt;"trill"}
  Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)
  
  ActionController::ParameterMissing (param is missing or the value is empty: stall):
    app/controllers/api/v1/stalls_controller.rb:47:in `stall_params'
    app/controllers/api/v1/stalls_controller.rb:27:in `create'
  
  
    Rendered /home/goutham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_source.erb (7.4ms)
    Rendered /home/goutham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (16.0ms)
    Rendered /home/goutham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.9ms)
    Rendered /home/goutham/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (135.0ms)
  </code></pre>