rails, yml, & multiline

随声附和 提交于 2019-12-07 11:12:28

问题


i cannot for the life of me get multiline yaml from my locale files to work.

i have tried every combination of multiple solutions with no success.

i have tried key: |, key: >, with double quotes, with singles quotes, with \n, with the value on the next line, indented, and probably some others.

and in my view i am just using t('key')

im tearing my hair out over here. any other suggestions or possible reasons the default yaml specs for multiline values are not working?


回答1:


From some fooling around in irb, it looks like you might want:

key: |-
  abc
  def


来源:https://stackoverflow.com/questions/5151526/rails-yml-multiline

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!