Setting attributes on a has_many through relationship


#1

The has_many through setup detailed below allows me to do
@system.software << and @software.systems << for establishing the
relationships, using an array of software or system objects,
respectively. This works out well because my form for software has a
software_ids multi-select. The problem I have is that the join model
has additional attributes to store. Can I use the above method and
somehow also include the additional attributes or do I have to do x =
SystemSoftware.new… x.system_status = SystemStatus.find(params
[:system_status_id]…etc.?

System.rb

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

Software.rb

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

SystemSoftware.rb

belongs_to :system
belongs_to :software