Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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