work on tag controller

This commit is contained in:
albert
2011-07-17 19:05:31 -04:00
parent 5a2644f4a6
commit 37e1b8d9da
4 changed files with 28 additions and 67 deletions

View File

@@ -163,6 +163,15 @@ module Danbooru
}
end
def canonical_tag_category_mapping
@canonical_tag_category_mapping ||= {
"General" => 0,
"Artist" => 1,
"Copyright" => 2,
"Character" => 3
}
end
# Returns a hash maping numerical category values to their
# string equivalent. Be sure to update the tag_category_mapping also.
def reverse_tag_category_mapping