Advertisement
Guest User

Untitled

a guest
Jul 30th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #!/usr/local/bin/ruby
  2.  
  3. require 'rubygems'
  4. require_gem 'activerecord'
  5.  
  6. ActiveRecord::Base.establish_connection(
  7. :adapter => "mysql",
  8. :username => "user",
  9. :host => "host",
  10. :password => "pass",
  11. :database => "db"
  12. )
  13.  
  14. class Contacto < ActiveRecord::Base
  15. set_table_name "datos_prueba"
  16. end
  17.  
  18. c1 = Contacto.find(1)
  19. c2 = Contacto.find(2)
  20. puts c1.nombre
  21. puts c2.nombre
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement