can you try to pass Post.create(post_params) instead of Post.create(params[post_params])
post_params is actually a full hash extracted from the params so you should not pass it to params again
If you want to add user_id you should add to your view something like this
<%= f.hidden_field :user_id, value: current_user.id %>