开发者

rails: is there a way to include multiple link_to's in yml?

I would like to clean up my views a little bit. Currently I am not sure about the syntax of yml and if there is a way to include link_to methods in a yml statement. One solution without link_to methods is the following, but I would like to keep it more simple if there is a way to do so. I don't like putting my css classes and other link params in the yml file. Since I'm quiet new to ruby on rails, I'm not sure if there is a smarter solution than that.

erb:

<%= raw(t('registration.terms')) %>

yml:

en:
  registration:
    terms: |
        <label for="registration_terms">I accept the</label> <a href='#terms_of_service' class='simple_link' rel='facebox'>Terms of Services</a> 
        <label for="registration_terms">and the</label> <a href='/non/i18n/supported/path' class='simple_link' rel='facebox'>Terms of Privacy</a> <开发者_StackOverflow社区;label for="registration_terms">...</label>.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜