lib/active_metadata/persistence/history.rb in active_metadata-0.6.6 vs lib/active_metadata/persistence/history.rb in active_metadata-0.6.7
- old
+ new
@@ -14,18 +14,18 @@
self.send(:send_notification, key, value[0], value[1], :history_message,current_user_id)
end
end
def history_for field, order="created_at DESC"
- #Rails.cache.fetch(history_cache_key(field), :expires_in => ActiveMetadata::CONFIG['cache_expires_in'].minutes) do
+ Rails.cache.fetch(history_cache_key(field), :expires_in => ActiveMetadata::CONFIG['cache_expires_in'].minutes) do
fetch_histories_for field, order
- #end
+ end
end
private
def invalidate_history_cache_for field
- #Rails.cache.delete history_cache_key(field)
+ Rails.cache.delete history_cache_key(field)
end
def fetch_histories_for field, order
ActiveMetadata::History.all(:conditions => {:document_class => metadata_class, :document_id => metadata_id,:label => field}, :order => order)
end
\ No newline at end of file