user model
用户模型
class User < ApplicationRecord
has_many :posts
accepts_nested_attributes_for :posts, allow_destroy: true
end
class User < ApplicationRecuser model
用户模型
class User < ApplicationRecord
has_many :posts
accepts_nested_attributes_for :posts, allow_destroy: true
end
class User < ApplicationRec