Vote #67152
完了Exclude "fields_for" from overridden methods in TabularFormBuilder
100%
説明
...since it's broken in some way in current implementation, and it's never called on the builder itself in Redmine core. It would be helpful to handle nested attributes in plugins.
To be clear, I'd like to be able to do something like this :
f.fields_for :association, MyAssociatedModel.new do ... end
or
f.fields_for :association, @main_object.my_associated_models do ... end
...where "f" is a standard TabularFormBuilder.
But it's broken in current implementation since method is overridden with a different signature than its parent : @fields_for(field, options={})@ VS @fields_for(record_or_name_or_array, *args, &block)@.
Patch attached, no test broken on my platform with current trunk (r3704). I can give a more detailed example if needed.
journals
Added in r3804, thank you for your contribution.
--------------------------------------------------------------------------------
Admin Redmine さんが約4年前に更新
- カテゴリ を Code cleanup/refactoring_30 にセット
- 対象バージョン を 1.0.0 (RC)_14 にセット