1

I'm trying to work with itunes rails gem, for example:

>> itunes = ITunes::Client.new
>> songs = itunes.music('green day she')
=> <#Hashie::Rash result_count=15 results=[...]>

so I need to make a wishlist with tracks founded with itunes gem and save it in cookies (yep). And I thought about something like that:

     cookies => {:wishlist=> {
    :track1=>#<Hashie::Rash result_count=1 results=[#<Hashie::Rash artist_id=423861127 artist_name="Amenra"], 
    :track2=>#<Hashie::Rash result_count=1 results=[#<Hashie::Rash artist_id=192738438 artist_name="65daysofstatic"]}}

But how to do this in rails correctly and how to get, for example, artist name from any track?

xamenrax
  • 1,724
  • 3
  • 27
  • 47
  • Okay, now I understood one part of my question - It's possible to take some values from results Hashie with something like this: `>> cookies[:wishlist][:track2].results.first.track_name` returns `=> "Radio Protector"` – xamenrax Nov 13 '12 at 09:29

0 Answers0