Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- equire 'rubygems'
- require 'active_record'
- ActiveRecord::Base.establish_connection(
- :adapter => 'mysql',
- :database => 'print_development',
- :username => 'root',
- :password => 'temp123',
- :host => '10.2.8.50')
- class Print_job < ActiveRecord::Base
- belongs_to :person
- end
- class Person < ActiveRecord::Base
- belongs_to :dept
- has_many :print_jobs
- end
- class Dept < ActiveRecord::Base
- has_many :people
- end
Add Comment
Please, Sign In to add comment