I need to do some task before I destroy a user. I am doing a system for a network marketing company. I need to change the user of users. So this is what I did:
class User < ActiveRecord::Base
def delete_this_user
some_actions
.
.
.
self.destroy
end
end
the
self.destroy
doesn't destroy the user from the database. Can anybody help? Thanks