Displaying 2 results from an estimated 2 matches for "to_ext_json".
2009 Sep 22
0
EXTJS + drag and drop
Hello friends
  I need to configure the extjs drag and drop but somehow i am not able to
display it.
my controller contains the following code
def index
    respond_to do |format|
      format.html
      format.ext_json { render :json => User.all.to_ext_json }
    end
  end
and in the index.erb
<div id="layout"></div>
I have included all the necessary js file which is required by extjs
But no idea why the things are not coming up.
NOTE: the extjs drag & drop window is coming up but no data inside.
Thanks
abhis
--~--~-----...
2011 Apr 21
0
Get data from 2 tables
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 ne...