title: Rails 4: Insert Attribute Into Params
body: <p>In Rails 3, it was possible to insert an attribute into params like so:</p>
  
  <pre><code>params[:post][:user_id] = current_user.id
  </code></pre>
  
  <p>I'm attempting to do something similar in Rails 4, but having no luck:</p>
  
  <pre><code>post_params[:user_id] = current_user.id
  
  . . . .
  
  
  private
  
    def post_params
      params.require(:post).permit(:user_id)
    end
  </code></pre>
  
  <p>Rails is ignoring this insertion. It doesn't throw any errors, it just quietly fails.</p>