The basic idea is corect, but I'd do this instead:

```ruby
current_user.posts.new(params[:post].merge(topic_id: params[:topic_id])
```