On Wed, Mar 31, 2010 at 4:21 AM, Joshua Partogi <[email protected]> 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 ------------------------ [email protected] 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 [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.

