开发者

Active Admin and STI model error: Could not find table 'categories'

Update #1: Solved! Somehow Pow did not restart it's processes, so after updates it was loading the old config files. And it was loading the wrong locale file.

I deleted gems I installed recently (only from Gemfile) and restarted Pow. Then one by one I added gems back to the Gemfile. As well ActiveAdmin as Rails localization started working normally.

Original question开发者_Go百科:

I am trying to setup ActiveAdmin to support my taxonomies. My setup is as following:

class Taxonomy < ActiveRecord::Base
end

class Category < Taxonomy
  has_ancestry # implements a tree of categories
end

class Tag < Taxonomy
end

So now I added the following to ActiveAdmin:

ActiveAdmin.register Category do
end

And it returns the folioing error:

Could not find table 'categories'

My migrations were definitely ran. And I have some valid STI records in the taxonomies table. So what can be wrong?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜