On Wed, Mar 31, 2010 at 4:21 AM, Joshua Partogi <jpart...@scrum8.com> wrote:
> This is what I wrote but it caused stack level too deep error: > > class FeatureObserver < ActiveRecord::Observer > def before_update(feature) > feature.send(:save) > end > end :save precedes :update, so you've just created an infinite loop :-) Try creating before_save, after_save, after_update methods in your observer with some `puts` logging statements, and run in a console, e.g. >> feature.send(:update) >> feature.send(:save) and see what you get... -- Hassan Schroeder ------------------------ hassan.schroe...@gmail.com twitter: @hassan -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.