Flickr.rb - displaying tags


#1

Maybe I’m having a “slow day” but I can’t for the life of me figure out
how to print a photo’s tags using the flickr gem (flickr.rb). Consider
this:

<% @photos.each do |photo| %>
Tags: <%= debug(photo.tags) %>
<% end %>

…Gives the following output:

tag:

  • authorname: gmacgregor
    author: 62682519@N00
    id: 4181224-280985155-130
    content: family
    raw: family
  • authorname: gmacgregor
    author: 62682519@N00
    id: 4181224-280985155-278
    content: portrait
    raw: portrait
  • authorname: gmacgregor
    author: 62682519@N00
    id: 4181224-280985155-3840
    content: child
    raw: child

How the heck to I traverse this? I’ve tried the following as well as a
few other variations but nothing seems to work:

<% @photos.each do |photo| %>
Tags: <% photo.tags.each do |tag| %><%= tag[‘raw’] %><% end %>
<% end %>

Ideas? Many thanks…


#2

Excuse me for digging up an old thread. However, i’ve been experiencing
the same issue with Flickr.rb and searched endlessly for an answer.

Still can’t seem to pull the tags for a specified image without the
format looking like the output above. Anyone have any advice on this?