add alt, title to species thumbnails

This commit is contained in:
Emi Matchu 2010-05-16 19:21:36 -04:00
parent d3ffefabfa
commit 5e5007e661

View file

@ -9,7 +9,9 @@ module ItemsHelper
pet_type.species = species pet_type.species = species
pet_type.color = color pet_type.color = color
src = sprintf(StandardSpeciesImageFormat, pet_type.image_hash) src = sprintf(StandardSpeciesImageFormat, pet_type.image_hash)
html + link_to(image_tag(src), '#', 'data-color-id' => color.id, 'data-species-id' => species.id, 'data-species-name' => species.name) human_name = species.name.humanize
image = image_tag(src, :alt => human_name, :title => human_name)
html + link_to(image, '#', 'data-color-id' => color.id, 'data-species-id' => species.id, 'data-species-name' => species.name)
end) end)
end end
end end