• Fixed railscast #103 Site-Wide Announcements Object of announcement showing up along with announcement

    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 =]

     

     

    1-min read. About as long as a Coldplay key change takes to ruin a song.

    Follow the cult

    New track posted most days. Pick your channel.

    30 weirdos already on the list
    📼 From the vault
    Dillon Francis, Allenora, America Foster - RIDDEM
    Jun 2026 — Dillon Francis doing a trap-influenced track on Monstercat is exactly as chaotic as you’d expect, and that’s not a complaint. “RIDDEM” leans hard into that dirty,...
  • ← Next Post Previous Post →
  • Leave a comment