I can't create model objects using accepts_nested_attributes_for. It won't create the nested object
问题 My model structure looks like this: Board has_many Topics. Topic has_many Posts. app/models/board.rb class Board < ActiveRecord::Base has_many :topics end app/models/topic.rb class Topic < ActiveRecord::Base belongs_to :user belongs_to :board has_many :posts accepts_nested_attributes_for :posts validates :title, presence: true, length: { maximum: 255 } validates :user_id, presence: true validates :board_id, presence: true ... end app/models/post.rb class Post < ActiveRecord::Base belongs_to