Vikrant wrote: > I have a model Model1 with the before_destory() method defined as > below. > > def before_destroy > self.status = 'deleted' > self.save! > return false #don't want to delete the row. > end >
Your transaction isn't completed until the request is completed. If you check your DB, you will not see any changes until the request has been completed (assuming that your transaction level is beyond dirty reads) Secondly, you shouldn't save in a before_destroy filter I also believe that returning false will abort the transaction and you will be left with an unmodified data source. ilan -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

