I have an after_find callback in a model, but I need to disable it in a particular controller action e.g.
def index
@people = People.find(:all) # do something here to disable after_find()?
end
def show
@people = People.find(:all) # after_find() should still be called here!
end
What is the best way to do it?
- Can I pass something in to .find to disable all/particular callbacks?
- Can I somehow get the controller name in the model and not execute the callback based on the controller name (I don't like this)..?
Help!