I`m using the joing model Part to access Treinando from Evento.
This code works well:
@treinandos = Evento.find(params[:evento_id]).treinandos
But the parts table has some more columns I need to retrieve
Even after some docs/googling and tests I was not able to append this
information to the resulting object @treinandos.
Can you give some hints about how to do it?
class Treinando < ActiveRecord::Base
has_many :eventos, :through => :parts
class Part < ActiveRecord::Base
class Evento < ActiveRecord::Base
has_many :treinandos, :through => :parts