ActiveAdmin with has_many problem; undefined method 'new_record?'

前端 未结 2 2016
暗喜
暗喜 2020-12-24 10:05

I\'m trying to customise a ActiveAdmin form for a Recipe model that has a has_many relationship with Step.

class Recipe < ActiveRecord::Base
  has_many :s         


        
2条回答
  •  眼角桃花
    2020-12-24 10:48

    class Recipe < ActiveRecord::Base
    
        attr_accessible :step_attributes
    
        has_many :steps
    
        accepts_nested_attributes_for :steps
    
    end
    

提交回复
热议问题