title: Replace a simple link in Spree using Deface Overrides
body: <p>I'm new to Spree and can't seem to wrap my head around the "erb[loud]" way of replacing dynamic rails content...</p>
  
  <p>I am simply trying to replace the 'Home' link on the navigation bar with different text like "Newest Products".  The text will redirect the user to the exact same index page...I just want to replace the link w/ some different text.  The partial in spree core is:</p>
  
  <p>spree / frontend / app / views / spree / shared / _main_nav_bar.html.erb...</p>
  
  <pre><code>&lt;nav class="columns sixteen"&gt;
    &lt;ul id="main-nav-bar" class="inline" data-hook&gt;
      &lt;li id="home-link" data-hook&gt;&lt;%= link_to Spree.t(:home), spree.root_path %&gt;&lt;/li&gt;
      &lt;li id="link-to-cart" data-hook&gt;
        &lt;noscript&gt;
          &lt;%= link_to Spree.t(:cart), '/cart' %&gt;
        &lt;/noscript&gt;
        &amp;nbsp;
      &lt;/li&gt;
      &lt;script&gt;Spree.fetch_cart()&lt;/script&gt;
    &lt;/ul&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>So far I've created an override file to use deface in my app at:</p>
  
  <p>store / app / overrides / change_home_text.rb</p>
  
  <pre><code>Deface::Override.new(:virtual_path =&gt; 'spree/shared/_main_nav_bar',
    :name =&gt; 'change_home_text',
    :replace =&gt; "erb[loud]:contains('&lt;li id="home-link" data-hook&gt;&lt;%= link_to Spree.t(:home), spree.root_path %&gt;&lt;/li&gt;')",
    :text =&gt; "&lt;li id="home-link" data-hook&gt;&lt;%= link_to, 'Newest Products', Spree.t(:home), spree.root_path %&gt;&lt;/li&gt;")
  </code></pre>
  
  <p>How should the :replace and :text lines be setup to correctly replace the link w/ the new text?</p>
  
  <p>much appreciated,</p>