Hi, i have 4 tables: questions, answers, users, and inquiries (relationship)
def index question_id = params[:id].to_i question = Question.find(question_id) @answers = question.answers
respond_to do |format| format.ext_json { render :json => @answers.to_ext_json(:class => Answer) } end end
I have several scaffold in extjs, when I click on row, i get answers on question that i just selected, COOL. But i need paste in this info email of people (emails stores in users table). Now i have this:
id | answer |
1 | lala 2 | lalala2
but i need this:
id | answer | email
1 | lala | alal@sa.com 2 | lal2 | asasa@was.net