Does The Ancestry Gem Work With Rails 4?

2019-05-07 03:42发布

Only mentions Rails 3 in the GitHub documentation - does anyone know if it's compatible with Rails 4?

I ask because it looks like it's been updated to handle Ruby 2.1.0

3条回答
何必那么认真
2楼-- · 2019-05-07 04:00

According to the travis build, tests pass with active record 4.

查看更多
来,给爷笑一个
3楼-- · 2019-05-07 04:15

Indeed, it works. We've been using it in one of our recent projects. You can also look at travis.yml file in the repo. It was tested to work with ActiveRecord 4.0.

查看更多
别忘想泡老子
4楼-- · 2019-05-07 04:19

Yes it's compatible with Rails 4, but you need to add :parent_id to permit params in your controller.

查看更多
登录 后发表回答