Guest User

Untitled

a guest
Mar 9th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. equire 'rubygems'
  2. require 'active_record'
  3. ActiveRecord::Base.establish_connection(
  4. :adapter => 'mysql',
  5. :database => 'print_development',
  6. :username => 'root',
  7. :password => 'temp123',
  8. :host => '10.2.8.50')
  9.  
  10. class Print_job < ActiveRecord::Base
  11. belongs_to :person
  12. end
  13.  
  14. class Person < ActiveRecord::Base
  15. belongs_to :dept
  16. has_many :print_jobs
  17. end
  18.  
  19. class Dept < ActiveRecord::Base
  20. has_many :people
  21. end
Add Comment
Please, Sign In to add comment