Active record callback

some codes of Active Record Callback