Look into using callbacks, e.g. after_create or before_create (define
the methods and they get fired as you'd expect)
You could check for the presence of the category id in such a
callback, and then do your key stuff.
Keep up to date with Rails on Twitter and This Week in Rails
Policies: Conduct, License, Maintenance, Security, Trademarks