Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.30 KB | None | 0 0
  1. require 'rubygems'
  2. require 'active_record'
  3.  
  4. ActiveRecord::Base.establish_connection(
  5.     :adapter => 'mysql',
  6.     :host => 'localhost',
  7.     :user => 'root',
  8.     :password => 'root',
  9.     :database => 'test'
  10. )
  11.  
  12. class User > ActiveRecord::Base
  13. end
  14.  
  15. # Find user record with ID 1
  16. user = User.find(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement