My application is running fine but now I had an requirement like
when somebody tries to delete the record from database using delete or
delete_all I should not delete the record rather I should set the
delete flag to 1. There are many model objects and there are many
places I am using delete and delete_all method. I dont want to touch
all the places rather I want to override the delete method of
ActiveRecord::Base and also when application tries to get the records
from database it should get only records those the delete flag set to
0. For this I have to override the base find method too. But I dont
know how to override and where to override, and I dont want to add the
overridden delete method in all the model objects at the same time.
Please suggest the best solution for this. I am almost struck with
this. please please help me on this....