Step と has_many 関係を持つ Recipe モデルの ActiveAdmin フォームをカスタマイズしようとしています。
class Recipe < ActiveRecord::Base
has_many :steps
end
class Step < ActiveRecord::Base
acts_as_list :scope => :recipe
belongs_to :recipe
end
これに関連して、ActiveAdminファイルに次のものがあります。
form do |f|
f.has_many :steps do |ing_f|
ing_f.inputs
end
end
フォームを読み込もうとすると、次のエラーがスローされます。
未定義のメソッド「new_record?」nil:NilClass の場合
これまで has_many メソッドに分離してきましたが、これを過ぎて迷っています。アドバイスや助けをいただければ幸いです。