I feel like this should be simple but it's stumping me.

In the following model, is there an easy way to setup my models so
that I can make the following call: @company.survey_answers

class Company < ActiveRecord::Base
  has_many :surveys
  has_many :survey_questions, :through => :surveys
end

class Surveys ...
  belongs_to :company
  has_many :survey_questions
end

class SurveyQuestions ...
  belongs_to :survey
  has_many :survey_answers
end

class SurveyAnswers ...
  belongs_to :survey_question
end


Thanks in advance for any help.

Cheers,
Chad




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to