1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Ticket.rb

has_and_belongs_to_many :software

Software.rb

has_many :system_software
has_many :systems, :through => :system_software
has_one :status, :through => :system_software, :foreign_key => :software_status_id
has_and_belongs_to_many :tickets

System.rb

has_many :system_software
has_many :software, :through => :system_software

SytemSoftware.rb

belongs_to :system
belongs_to :software
belongs_to :software_status

SoftwareStatus.rb

has_many :software_status
has_many :software, through => :system_software