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

Namespacing Models et al #14764

Closed
singpolyma opened this issue Apr 15, 2014 · 1 comment
Closed

Namespacing Models et al #14764

singpolyma opened this issue Apr 15, 2014 · 1 comment

Comments

@singpolyma
Copy link

Just ran into this for the first time and thought it was worth talking about: because models and controllers and such just live in the root namespace, they can be shadowed when importing a gem.

My proposal (for discussion) is that Rails could put all the app classes inside the module that exists for the app (as defined in config/application.rb). Autoloading, auto-lookup, etc would use the fully-qualified name, but the unqualified name would still work everywhere in app code because we're inside the module. Then if an overlapping name exists in a gem we can get at it with ::Name, etc.

Thoughts?

@rafaelfranca
Copy link
Member

Please use the Rails Core mailing list to discussions. The issues tracker is only for issues and pull requests.

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