fixed tag category coloring, fixed tag category expiration when updating, work on migration

This commit is contained in:
albert
2011-10-10 17:08:29 -04:00
parent 5fb1a17516
commit e011c36ffe
13 changed files with 228 additions and 11 deletions

View File

@@ -66,7 +66,7 @@ class Tag < ActiveRecord::Base
end
def update_category_cache
Cache.put("tc:#{Cache.sanitize(name)}", category)
Cache.put("tc:#{Cache.sanitize(name)}", category, 1.hour)
end
end
@@ -95,6 +95,7 @@ class Tag < ActiveRecord::Base
if tag
if category > 0
tag.update_category_cache
tag.update_column(:category, category)
end