开发者

Ruby on Rails - {{model}} appearing in some inputs

开发者 https://www.devze.com 2023-04-04 22:03 出处:网络
In some of my form input buttons, the value of some 开发者_开发技巧buttons is for example: Create {{model}}

In some of my form input buttons, the value of some 开发者_开发技巧buttons is for example: Create {{model}} Why is Ruby on Rails displaying {{model}}?


This will most likely come from your translations. If in your localisation-file (config/locales/en.yml for example) you write something like

posts:
  create: Create {{model}}

you should call the translation like this:

I18n.t('posts.create', :model => 'Post')

Hope this helps.

0

精彩评论

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