Я использую gem ancestry
в приложении Rails3.
Я пытаюсь изменить существующую модель с именами сайтов, чтобы использовать глубину кеша.
В документации сказано следующее:
:cache_depth Cache the depth of each node in the 'ancestry_depth' column (default: false)
If you turn depth_caching on for an existing model:
- Migrate: add_column [table], :ancestry_depth, :integer, :default => 0
- Build cache: TreeNode.rebuild_depth_cache!
Я добавил миграцию.
Но я не понимаю, как выполнить - Build cache: TreeNode.rebuild_depth_cache!
Где мне это сделать?
Спасибо за вашу помощь!