Created
July 23, 2008 22:34
-
-
Save ab5tract/1922 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I was hoping something like this might work .... | |
# The hope was that config.database could as easily be a string as a hash.... | |
+++configurations/development.rb | |
module Blog | |
module Configurations | |
class Development < Default | |
database 'jdbc:postgresql://localhost/jblog?user=waves' | |
.... | |
+++layers/orm/sequel.rb | |
def app.database | |
if defined?(JRUBY_VERSION) | |
@sequel ||= ::Sequel.connect config.database | |
else | |
@sequel ||= ::Sequel.open( config.database ) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment