title: Redirect_to not working
body: <p>I have a tutorial for building web app for placing ads (using Rails 4.2.6, but book was written about older version); and the idea of create action is to redirect user to new add page after it created. The suggested code from the book look this way:</p>
  
  <pre><code>def create
      @ad = Ad.new(ad_params)
      @ad.save
      redirect_to "/ads/#{ @ad.id }"
  end
  </code></pre>
  
  <p>Unfortunately, it doesn't redirect anywhere - user get stucked on the congrats-page:</p>
  
  <pre><code>&lt;h1&gt;Ad created!&lt;/h1&gt;
  view your ad &lt;a href="ads/&lt;%= @ad.id %&gt;"&gt;here&lt;/a&gt;
  </code></pre>
  
  <p>What is the problem in my redirect code? What is the reason to use at one place #{@object}-construction, and at another - &lt;%= @object %> ?</p>