Fosome / garb

A Ruby wrapper for the Google Analytics API
http://www.viget.com/extend/
654 stars 89 forks source link

Garb::Profile.all errors if you only have one Google Analytics profile #104

Open rvwong opened 13 years ago

rvwong commented 13 years ago

If you access an account that only has one profile, you get the following error if you try to execute

Garb::Profile.all

NoMethodError: You have a nil object when you didn't expect it!

I believe this is either a bug in Garb or a bug in the Google Analytics. It seems to me that when you only have one profile, google is returning the profile itself rather than the profile inside an array.

tpitale commented 13 years ago

Thanks, I'll take a look.

reillyse commented 13 years ago

I can confirm that it gives a nil with one profile, Garb::Management::Profile.all. works fine though