新しいコメント モデルは Web サイトでうまく機能しますが、管理者ビューに移動して「ガイドライン」(別のモデル) を表示しようとすると、次のエラー メッセージが表示されるため、activeadmin に問題があります。
未定義のメソッド「コメント」
私のモデルcomment.rb:
belongs_to :guideline
belongs_to :commenter, class_name: 'User'
attr_accessible :body, :commenter_id
私のモデルのガイドライン.rb:
attr_accessible :content, :hospital, :title, :user_id, :guideline_id, :specialty, :updated_by, :current_user, :subtitle, :slug, :activities, :comment, :visible
belongs_to :user
has_many :favourite_guidelines
has_many :comments, :dependent => :destroy
admin/guidelines.rb:
index do
column :comment
default_actions
end