Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/local/bin/ruby
- require 'rubygems'
- require_gem 'activerecord'
- ActiveRecord::Base.establish_connection(
- :adapter => "mysql",
- :username => "user",
- :host => "host",
- :password => "pass",
- :database => "db"
- )
- class Contacto < ActiveRecord::Base
- set_table_name "datos_prueba"
- end
- c1 = Contacto.find(1)
- c2 = Contacto.find(2)
- puts c1.nombre
- puts c2.nombre
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement