Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Models in Rails Engines Erroring (1.2.0, I think) #52

Open
tpitale opened this issue May 24, 2016 · 0 comments
Open

Models in Rails Engines Erroring (1.2.0, I think) #52

tpitale opened this issue May 24, 2016 · 0 comments

Comments

@tpitale
Copy link
Member

tpitale commented May 24, 2016

Originally opened by @jkestr: datamapper/dm-core#175

I've been running into an issue with existing models and engines I have built from previous versions of DataMapper.

It appears with 1.2.0, it is no longer possible to have models inside of an engine without explicitly calling #finalize on each model. Is this a known issue, and if so are there any work arounds?

DataMapper.finalize does not work in this context, as it does not see the models inside of the engines. I tried creating an initializer that calls finalize on each model, but I ran into issues with Devise not yet being loaded.

What did work was putting .finalize at the bottom of each model definition, but I would rather not have to do that, and I am sure it would only cause other issues with relationships and such.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant