I18n.t(defaults.shift, model: model, default: defaults)
此rails代码使用I18n.t
选项调用model
。它是什么?
Rails Internationalization (I18n) API — Ruby on Rails Guides不要说模型选项。
答案 0 :(得分:1)
你可以在这里找到 https://github.com/rails/rails/blob/master/actionview/lib/action_view/locale/en.yml
默认为
helpers:
select:
# Default value for :prompt => true in FormOptionsHelper
prompt: "Please select"
# Default translation keys for submit and button FormHelper
submit:
create: 'Create %{model}'
update: 'Update %{model}'
submit: 'Save %{model}'