Q:

Interpolation during for each isn't working

I am having a weird error when I am running for each to go through the category.  When I go and put the file name it works then but for some reason it isn't interpolating the title.  This is the code for the html:
%h1 Catagories
- @catagories.each do |catagory|
  .col-md-6
    .catagory-lists
      %h2
        = catagory.title
      = image_tag('icons/#{catagory.title}.png', alt: '#{catagory.title}')

This is the output of this code: 
<img alt="#{catagory.title}" src="/images/#{catagory.title}.png">

A:

Just figured it out.  It turns out that single quotation marks aren’t interpolated.  So turning this:
= image_tag('icons/#{catagory.title}.png', alt: '#{catagory.title}')

into this:
= image_tag("icons/#{catagory.title}.png", alt: "#{catagory.title}")

fixes it

