Error

Player model
def update_statistics(game)
for round in game.rounds


end

Why am I getting
undefined method `each’ for #Round:0x261cc0c
??

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

edberner wrote:
| Player model
| def update_statistics(game)
| for round in game.rounds
|
| …
| end
|
| Why am I getting
| undefined method `each’ for #Round:0x261cc0c
| ??

Because game is not an Array.


Phillip G.
Twitter: twitter.com/cynicalryan

~ - You know you’ve been hacking too long when…
…your speech is punctuated by finger twitches (or arm-waving)
indicating braces.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgHkLkACgkQbtAgaoJTgL/PoQCeIbFkBWGCAxbBU6mk5riAE0+l
/qQAnjo2+kmMYmwUNEe0andizb7v7etU
=oBQs
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

edberner wrote:
| Player model
| def update_statistics(game)
| for round in game.rounds
|
| …
| end
|
| Why am I getting
| undefined method `each’ for #Round:0x261cc0c

Err, disregard my earlier mail.

round is not an Array or any other Object including Enumerable.


Phillip G.
Twitter: twitter.com/cynicalryan

~ Hobbes : What if the public doesn’t like your work?
~ Calvin : They are not supposed to like it. This is avant-garde
stuff!
~ I’m criticizing the low brows who can’t appreciate great
art
~ like this!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgHkQEACgkQbtAgaoJTgL/nMwCghOKHeBWTS9RVgh4ObCBPFe2/
7QgAniouxx4jk1RJd1r1joGJAAwf1t5V
=kjDN
-----END PGP SIGNATURE-----