2
몽고이 카운터 캐쉬를 사용하려고하는데 작동하지 않습니다. 몽고 이드 3.1.0 카운터 캐시가 작동하지 않습니다.
난 그냥belongs_to :user, counter_cache: true
을 사용하려고하지만 그럼
Problem:
Invalid option :counter_cache provided to relation :user.
Summary:
Mongoid checks the options that are passed to the relation macros to ensure that no ill side effects occur by letting something slip by.
Resolution:
Valid options are: autobuild, autosave, dependent, foreign_key, index, polymorphic, touch, class_name, extend, inverse_class_name, inverse_of, name, relation, validate, make sure these are the ones you are using.
를 반환 내가
include Mongoid::CounterCache
내 웹 서버가 다시 노력을 다시 시작 추가,하지만
을 반환
uninitialized constant Mongoid::CounterCache
이 문제에 대한 아이디어가 있습니까?
작동합니다. 그러나 나는 새로운 아이를 시작할 때마다 이것을해야만합니까? 그것 없이는 작동하지 않는 것 같습니다. 아니면 부모님이 두 명이나 되는가? –