title: Trying to get a POST to return 400 bad request
body: <p>I have a create method that builds a new model through an association and I was expecting it to return a 400 response with some text if no params were in the POST request. However, I get an error.</p>
  
  <p>This is in Rails 4.0.2</p>
  
  <p>controller methods:</p>
  
  <pre><code>  def create
      @cast_profile = current_user.build_cast_profile(cast_profile_params)
      if @cast_profile.save
        redirect_to cast_profile_path
      else
        render :edit
      end
    end
  
    def cast_profile_params
      params.require(:cast_profile).permit(:name, :email, :public)
    end
  </code></pre>
  
  <p>If I pass the params its all fine but I'm trying to test the bad request scenario.
  Here's the error:</p>
  
  <pre><code>ActionController::ParameterMissing: param not found: cast_profile
  </code></pre>
  
  <p>I could rescue it explicitly but I thought strong parameters was supposed to do that automatically.</p>