Guest User

Untitled

a guest
Feb 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. # I was hoping something like this might work ....
  2. # The hope was that config.database could as easily be a string as a hash....
  3.  
  4. +++configurations/development.rb
  5.  
  6. module Blog
  7.  
  8. module Configurations
  9.  
  10. class Development < Default
  11.  
  12. database 'jdbc:postgresql://localhost/jblog?user=waves'
  13. ....
  14.  
  15. +++layers/orm/sequel.rb
  16.  
  17. def app.database
  18. if defined?(JRUBY_VERSION)
  19. @sequel ||= ::Sequel.connect config.database
  20. else
  21. @sequel ||= ::Sequel.open( config.database )
  22. end
  23. end
Add Comment
Please, Sign In to add comment