Displaying 1 result from an estimated 1 matches for "refresh_data".
2006 Aug 25
1
Reload instance data on instantiate
...lass which is a cache for amazon items. I''d like to
have the class instances to refresh data every day (Time.now -
item.last_updated > 1.day) but not sure how.
I''ve tried with
class Item < ActiveRecord::Base
# ...
private
def instantiate(record)
super
refresh_data!
logger.info "refresh test"
end
end
but nothing happens.
Any ideas on this? Is ''instantiate'' the method I''m looking for?
Thanks,
Koke
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to t...