Add rails callback methods

Add missing rails callback methods