In the database, I have a table called Questions. It has four columns like
Id, Question_text, Question_type, Answer_table
The user can select only the id and question_text. I am able to get the Id and question_text value. I need to get the value of Question_type and Answer_table from that Id.
For example,
If the user selects the question_text = 'City' with Id = 5.
I want the values for other columns of question_type and Answer_table by the params of this id. to store in a separate variable.
Got it by using the Map method in ruby on rails to get the values of other columns by through association. Thanks!!