Hi there, I recently fixed a problem where the object of an announcement was being printed along with the announcement message itself.

So I recently solved a really silly mistake in Rails. I'm quite new, but I thought I'd share this "gotcha" in case I forget or others run into this trouble.

I have been adding a few features to one of my apps following Railscast #103 Site-Wide Announcements (revised). 


At the time here is what I was looking at: 


All this garbage below my nice site announcements! What gives? Why is each object printing out below the announcement?

Here is a look at my code, see if you can spot my typo



Just one little extra typo in the announcement loop, d'oh. But the fix is quick as you'll see . . .

And just like that voila. No more object garbage and just my announcement.message


(note, looks suspiciously like I photoshopped it out, but that white mark is just the top of the main graphic . . bad monosnap skills)

That makes me happy, and the tests are passing =]