Watch the whitespace!

Also, you probably want to make this association only after the resource saves successfully.