ネストされたモデル(:admin accepts_nested_attributes_for :account_setting
)からのチェックボックスがいくつかあります。デフォルトでは、チェックボックスのラベルはモデルの属性から生成されます。しかし、私は、ロケールフォルダに格納するカスタムラベルをキー値のペアとして使用したいと思います。Formtasticを使用してカスタムラベルをチェックボックスに割り当てます。
これは、コードで
= semantic_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :validate => true, :html => { :method => :put }) do |f|
= f.input :email
= f.inputs :receive_email_digest, :as =>:check_boxes, :for => :account_setting, :label => 'My custom label'
そして、それは動作しません。私は:input_html, :member_label
を試しました。
これはformtastic supporですか?それともハックする必要がありますか?
第2の溶液が働いた。ありがとうございました。 – Rahul