Guest User

Untitled

a guest
Apr 26th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. require "rubygems"
  2. require "data_mapper"
  3.  
  4. DataMapper.setup(:backup, {
  5. :adapter => "postgres",
  6. :database => "core_ggs_backup",
  7. :username => "merbivore",
  8. :password => "merbivore",
  9. :host => "localhost"
  10. })
  11.  
  12. repository(:backup).adapter.resource_naming_convention =
  13. DataMapper::NamingConventions::UnderscoredAndPluralized
  14.  
  15. class Location
  16. include DataMapper::Resource
  17.  
  18. property :id, Fixnum, :serial => true
  19. end
  20.  
  21. puts DataMapper.repository(:backup).adapter.exists?("locations")
Add Comment
Please, Sign In to add comment