From 5e5007e661fe608ccbb5fc1493fe83fe4f808d28 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sun, 16 May 2010 19:21:36 -0400 Subject: [PATCH] add alt, title to species thumbnails --- app/helpers/items_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/helpers/items_helper.rb b/app/helpers/items_helper.rb index 67553d0f..88d64967 100644 --- a/app/helpers/items_helper.rb +++ b/app/helpers/items_helper.rb @@ -9,7 +9,9 @@ module ItemsHelper pet_type.species = species pet_type.color = color 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