I have two models, quiz and quiz_question, where quiz_question belongs to quiz. If i change the foreign key, the named association doesn't update. Can i force it to?
>> quiz_question = QuizQuestion.last => #<QuizQuestion id: 707, quiz_id: 48, question_id: 474, position: 21, low_band: 1, high_band: 1, created_at: "2010-02-15 15:44:06", updated_at: "2010-02-15 15:44:06", difficulty_id: 1> >> quiz_question.question.id => 474 >> quiz_question.question_id = 473 => 473 >> quiz_question.question.id => 474 Ideally, here, when i change question_id (but don't yet save) i'd like the .question method to return question 473, not 474. Is there a method i can call to make the named association update itself based on the foreign key? thanks, max -- Posted via http://www.ruby-forum.com/. -- 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.

