Re: [Rails] How to get the value of association column name in ruby on rails?

2012-10-11 Thread Colin Law
On 10 October 2012 23:54, Sri ganesh K wrote: > If i have two models like Question and Answer. Question has three columns > like question_id, question_type, question_text and Answer has three values > answer_id, question_id, answer_text. Question should generally not have a question_id field, it

[Rails] How to get the value of association column name in ruby on rails?

2012-10-10 Thread Sri ganesh K
If i have two models like Question and Answer. Question has three columns like question_id, question_type, question_text and Answer has three values answer_id, question_id, answer_text. I am creating form for the Answer model. Example: <%= f.text_field :question_id %>. <%= f.hidden_field :q