title: How do I use HAML in a dynamic link?
body: <p>I am trying to create a link using HAML which looks like the this </p>
  
  <pre><code>=link_to("Last updated on&lt;%=@last_data.date_from.month %&gt;",'/member/abc/def?month={Time.now.month}&amp;range=xyz&amp;year={Time.now.year}')
  </code></pre>
  
  <p>It is not taking the Ruby code and it is displaying that as a string</p>
  
  <blockquote>
    <p>Last updated on&lt;%=@last_data.date_from.month %></p>
  </blockquote>
  
  <p>and in the URL as well it is not taking the function <code>Time.now.month</code> or <code>Time.now.year</code> .</p>
  
  <p>How do I pass Ruby code in URL and in the string ?</p>