neoid-gem / neoid

Extend Ruby on Rails ActiveRecord with Neo4j nodes. Keep RDBMS and utilize the power of Neo4j queries.
MIT License
171 stars 33 forks source link

Specs don't pass when enable_per_model_indexes = true #27

Closed erez-rabih closed 10 years ago

erez-rabih commented 11 years ago

Hi,

We're trying to integrate neoid with per index models set on. The problem is that now we can't create any activerecord model which includes neoid.

I also cloned the gem and set per model indexes to true on the spec_helper and the gem's specs don't pass.

Is there an easy way to fix this?

Thanks in advance.

BenMorganIO commented 10 years ago

No easy way to fix this. The specs are just failing left, right, and centre anyways. We're actively working on this.

Apologies.

BenMorganIO commented 10 years ago

I would recommend making a Neoid::Node::Base for your project and having that inherit from ActiveRecord::Base. Use that as the middleman so that you can modularize Neoid and not have to worry about Neoid functionality leaking into any models that might not want it. It also makes things a lot easier to fix.

Long story short: don't edit ActiveRecord::Base.

erez-rabih commented 10 years ago

Thanks for the tip Ben, I'll look into it.