associating has_many through on create

when my models had a HABTM relationship, i got the cool method that assigns relational items when creating a new record. the simple example that i can think of would be a habtm between posts and categories.

if i'm creating a new post, i can just use the category_ids= method and everything works. now that i'm using HMT, i don't have that nice method anymore. what's the best way of associating categories to posts on create.