I use callbacks (after_save, etc.) extensively to rebuild model relationships. However, there are times when I don''t want them to execute, and I don''t want the caller to know about it. For example, if I have a model object with saved search criteria and tags, I want to execute the search when the criteria changes but not when the tags change. In the end, all I really need to know is what attributes changed. I have a scheme involving overriding =, but it doesn''t always work (update_attributes doesn''t use obj.attr = new_value, for example). Any suggestions? --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
if i didn''t understand you wrong, skip_xxx_filter could help you. have a look at: http://api.rubyonrails.org/classes/ActionController/Filters/ClassMethods.html#M000320 --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I thought skip_xxx_filter was for controllers. I need the model. The more I think about it, my issue is not with turning off the contacts. What I really need it a simple way to know what attributes changed. With that, my callback method can determine whether it will run or not. On Feb 11, 12:42 pm, Pascal Friederich <pau...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> if i didn''t understand you wrong, skip_xxx_filter could > help you. have a look at:http://api.rubyonrails.org/classes/ActionController/Filters/ClassMeth...--~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---