fix a nil class error about tag

This commit is contained in:
Ruling-Mac 2015-07-16 17:02:24 +08:00
parent 7951358695
commit 423326d67c
1 changed files with 3 additions and 2 deletions

View File

@ -38,8 +38,9 @@ class ArchivesController < ApplicationController
}
end
{
"tag-name" => t[0].name,
"tag-name" => (t[0].name rescue ""),
"archives" => archives
}
end
if(files_by_category_tag.empty?)
@ -91,7 +92,7 @@ class ArchivesController < ApplicationController
}
end
{
"tag-name" => t[0].name,
"tag-name" => (t[0].name rescue ""),
"archives" => archives
}