Rails3 compatibility: replace before_create