Reputation: 683
This is my code
%ul.thumbnails
%li.span3
%header
%h2
= link_to t('homepage.house.link'), houses_path
I have a variable @country.name. How can I add/concatenate this variable to t('homepage.house.link')?
Upvotes: 2
Views: 2209
Reputation: 6485
I'm not sure how t()
works. What about:
= link_to t("homepage.house.link" + @country.name), houses_path
If you just want the link name change you can do:
= link_to t("homepage.house.link") + @country.name, houses_path
Or string interpolate the entire line:
= link_to "#{t('homepage.house.link')} #{@country.name}", houses_path
Upvotes: 3