开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜