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-l85rjibHVTE@public.gmane.org
2 | lal2 | asasa-XUCNv8pYSA0@public.gmane.org
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.