How I broke Dev.to on my First PR

Today I made my first PR to dev.to, which lets you add options to glitch embeds. I struggled to install the requirements and build the app, wrote unit tests for the new features, learned my first bits of ruby, and after a few hours of playtime, submitted the PR. It was quickly accepted, ✨THANKS, @ben!🌟

That's when I noticed that every single glitch embed on the entire site was broken


Thanks to @rhymes, for pointing the problem out:


The solution was as face-palmy as the bug itself: I left out the # which designates an interpolation in ruby strings:

-    src={@uri}
+ src=#{@uri}

A fun learning exercise for me. I sincerely hope that my oversight didn't cause any inconvenience.

New PR is in flight, once the fix is live I'll write a regression test.


GitHub GitLab Three horizontal lines LinkedIn Mastodon RSS Stack Overflow