出于某种原因,我无法让 has_many/belongs_to 关系起作用。嵌套内容类型不会显示在父级中。这是我所拥有的:
应用程序/content_types/news_photos.yml
- article:
label: News articles
type: belongs_to
target: news_articles
应用程序/content_types/news_articles.yml
- news_photos:
label: News photos
type: has_many
target: news_photos
class_name: news_photos
inverse_of: news_article
required: false
hint: A description of the field for the editors
localized: false
ui_enabled: true
谢谢您的帮助!