开发者

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

开发者 https://www.devze.com 2023-03-31 02:15 出处:网络
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.

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

精彩评论

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

关注公众号