dataset.update(params) isn't calling after_update hook

2009-08-25 Thread Tal
Subject pretty much covers it. Running this code isn't calling the after_update hook: Post.filter(:id = parent_id).update(:comment_count = :comment_count +1) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: dataset.update(params) isn't calling after_update hook

2009-08-25 Thread Aman Gupta
after_update hooks are only invoked when you use Model#update, not Dataset#update. There's no way to know which model instances were affected by a dataset update. Aman On Tue, Aug 25, 2009 at 4:06 PM, Tal swimming.b...@gmail.com wrote: Subject pretty much covers it. Running this code isn't

Re: dataset.update(params) isn't calling after_update hook

2009-08-25 Thread Jeremy Evans
On Aug 25, 5:05 pm, Aman Gupta themastermi...@gmail.com wrote: after_update hooks are only invoked when you use Model#update, not Dataset#update. There's no way to know which model instances were affected by a dataset update. Aman is correct. If you want the after_update hooks run, you need