Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get namespace from a model subclass #33

Open
miquelruiz opened this issue Dec 27, 2013 · 1 comment
Open

Can't get namespace from a model subclass #33

miquelruiz opened this issue Dec 27, 2013 · 1 comment

Comments

@miquelruiz
Copy link

Hi!

I don't know if this is an expected behaviour: the "namespace" method called in a subclass of a model always returns "undef".

Here you can find a minimal script in order to reproduce:
https://gist.github.com/miquelruiz/8147660

Is there any workaround (or fix) in order to make this work?

Thanks in advance,
Miquel Ruiz

@clintongormley
Copy link
Owner

Heya @miquelruiz

Currently, no, you can't do that. Namespaces are stored in the metaclass, so the myapp namespace is registered against the MyApp class.

We could potentially add some inherit_meta call which would retrieve these settings and add them to the inheriting class. But for now you could just repeat the has_namespace spec in MySubclass itself.

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

No branches or pull requests

2 participants