nested attributes in simple_form returns mass assignment error
Models: class Topic < ActiveRecord::Base has_many :posts, :dependent => :destroy validates :name, :presence => true, :length => { :maximum => 32 } attr_accessible :name, :post_id end class Post < ActiveRecord::Base belongs_to :topic, :touch => true has_many :comments, :dependent => :destroy accepts_nested_attributes_for :topic attr_accessible :name, :title, :content, :topic, :topic_attributes end View: <%= simple_form_for :post, :url => { :controller => :posts, :action => "create" } do |f| %> <h1>Create a Post</h1> <%= f.input :name, :label => false, :placeholder => "Name" %> <%= f.input