Displaying 1 result from an estimated 1 matches for "pages_count".
Did you mean:
page_count
2006 Jun 08
2
counter_cache is not looking for children_count with acts_as_tree
Hi there, the acts_as_tree API says that I can set a counter cache and
that it will automatically increment the "children_count" column. I
did that but when I create a new page it asks for a "pages_count"
column instead.
Here is the relevant part of page.rb model:
class Page < ActiveRecord::Base
acts_as_tree :order => :position, :counter_cache => true
acts_as_list :scope => :parent_id
end
And here is what happens when I create a new page:
Mysql::Error: #42S22Unknown column...