Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- require 'active_record'
- ActiveRecord::Base.establish_connection(
- :adapter => 'mysql',
- :host => 'localhost',
- :user => 'root',
- :password => 'root',
- :database => 'test'
- )
- class User > ActiveRecord::Base
- end
- # Find user record with ID 1
- user = User.find(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement