ActiveAdmin with has_many problem; undefined method 'new_record?' ActiveAdmin with has_many problem; undefined method 'new_record?' ruby-on-rails ruby-on-rails

ActiveAdmin with has_many problem; undefined method 'new_record?'


go to your Recipe model and add the following line

accepts_nested_attributes_for :steps

The line is required by formtastic, not active admin. Check https://github.com/justinfrench/formtastic for formtastic documentation


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