Extend Merb-DataMapper for custom configuration
Reported by Aaron Wheeler | April 18th, 2008 @ 08:49 AM
It would be nice if one were able to configure merb_datamapper to specify a custom database configuration file from the init.rb file like so:
Merb::BootLoader.before_app_loads do
Merb::Plugins.config[:datamapper] = {
:config_file => Merb.root / "config" / "database.alt.yml"
}
end
It's not as simple as overwriting Merb::Orms::Datamapper.config_file() because the database is connected to immediately after the gem is loaded, which gives no time to overwrite the module.
The attached patch adds the ability to specify a custom config database file.
Comments and changes to this ticket
-
Ezra Zygmuntowicz May 4th, 2008 @ 04:40 AM
- → State changed from new to resolved
- → Assigned user changed from to Ezra Zygmuntowicz
applied thanks
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
