This project is archived and is in readonly mode.
Add an API for querying what ORM is being used
Reported by David Chelimsky | September 5th, 2010 @ 05:20 PM
Extension libraries sometimes need to know what ORM is being
used in order to load the right code. We can't rely on
defined?(:ActiveRecord) because users tend to leave the
defaultrequire
'rails/all'inapplication.rband load their ORM of
choice in addition toActiveRecord.
The info is available at
Rails.configuration.generators.options[:rails][:orm],
but that presents a few problems:
- I'm not certain that there are any guarantees that this will be populated in a situation other than running generators.
- The dependency on
generatorsfeels odd for a non-generator activity - Even with that, it's a long route to traverse to get to high level information
I'd propose adding an API for this like
Rails.configuration.orm, or even
Rails.orm. I'm happy to submit a patch for this, but
would like to get a conversation going first.
Comments and changes to this ticket
-

David Chelimsky November 22nd, 2010 @ 02:08 PM
José and I discussed this a bit and agree that this does not add value that can't be achieved in other ways. Please feel free to close.
-

José Valim November 22nd, 2010 @ 02:13 PM
- State changed from new to resolved
- Importance changed from to Low
-

José Valim November 22nd, 2010 @ 02:40 PM
- State changed from resolved to invalid
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>