【问题标题】:Globalize3 module translation for database数据库的 Globalize3 模块翻译
【发布时间】:2011-10-19 23:22:12
【问题描述】:

我遇到了 Globalize3 的问题,我已经构建了一个模块来在 Admin 中为 Preferences User 添加翻译

我按她的 ID 和地区显示每个翻译。但我不明白为什么我想显示页面时没有定义语言环境。

更好的展示要点:https://gist.github.com/266562670cd8dab28548#gistcomment-43681

感谢您的帮助

固定。

【问题讨论】:

    标签: ruby controller translation globalize2


    【解决方案1】:

    如果您查看了在偏好主题翻译的更新操作中获得的参数(只需提高参数 [:preference_topic_translation])。您会注意到您可能有 preference_topic_option_translation 作为模型中不存在的属性之一。

    您需要更新表格中的第 12 行:

    <%= f.fields_for preference_topic_option_translation do |translate_form| %>
    

    应该是:

    <%= f.fields_for :preference_topic_option_translations, preference_topic_option_translation do |translate_form| %>
    

    【讨论】:

      猜你喜欢
      • 2018-06-25
      • 1970-01-01
      • 2011-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-21
      • 1970-01-01
      相关资源
      最近更新 更多