Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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
Add Comment
Please, Sign In to add comment