I’m wondering if it’s possible to pass an argument to a custom finder
method when working with cache_fu. The excellent “Advanced Rails
Recipes” book has the following example:
The custom finder method in the model wasn’t changed? That’s right!
The cache_fu plugin offers a number of really sweet features, and one of
our favorites is being able to pass a method name to the cached method
and have the result cached. For example, now over in our controller we
can use User.cached(:find_latest):
@users = User.cached(:find_latest)
How can I do it so that find_latest actually has an argument like
def self.find_latest(geography)
and then do
@users = User.cached(:find_latest(‘North America’))
Thanks.