使用: Rails 3.0.3、Ruby 1.9.2
関係は次のとおりです。
class Person < ActiveRecord::Base
has_many :contact_methods
accepts_nested_attributes_for :contact_methods
end
class ContactMethod < ActiveRecord::Base
attr_accessible :info
belongs_to :person
end
I18n で contact_method ラベルをカスタマイズしようとすると、認識されません。
en:
helpers:
label:
person[contact_methods_attributes]:
info: 'Custom label here'
私も試しました:
person[contact_method_attributes]
これは、1 対 1 の関係では問題なく機能します。
person[wife_attributes]:
name: 'My wife'
だがしかしperson[wives_attributes]
前もって感謝します