I am trying to create a link using HAML that looks like
=link_to("Last updated on<%=@last_data.date_from.month %>",'/member/abc/def?month={Time.now.month}&range=xyz&year={Time.now.year}')
It does not accept Ruby code and displays it as a string
Last update: <% = @ last_data.date_from.month%>
and the Time.now.month or Time.now.year function is also not executed in the URL.
How to pass Ruby code to url and string?
ruby ruby-on-rails ruby-on-rails-3 haml
Arihant godha
source share