search for: parent_quiz

Displaying 4 results from an estimated 4 matches for "parent_quiz".

2006 Apr 01
12
Repost: Why is rails generating bad SQL?
...e needed if we instantiate presentations in the initialize, # but that will require thinking because we already have a use for # the initialize method. @question = Question.new STDOUT.print("\r\n------------------------------\r\n") STDOUT.print("Looking for Parent= ",params[:parent_quiz],"\r\n") aParent = Quiz.find(:conditions => ["id=?",params [:parent_quiz]], :limit => 1) STDOUT.print("Found Parent= ",aParent,"\r\n") # aParent is returning nil, but it shouldbe a valid object Here''s the STDOUT log (I have instrument...
2006 Apr 01
0
Okay, what gives? find_by_id is failing.
...e look of a "just don''t quite get it yet" problem. I am using the ActiveRecord.find_by_id method to identify the parent object (Quiz) to tie to the child object (Question) at create time. Here is the stdout log: 127.0.0.1 - - [31/Mar/2006:22:43:22 CST] "GET /question/new? parent_quiz=ff2d7022-be0a-11da-9f01-00400506faf5 HTTP/1.1" 200 806 http://localhost:3000/questions?parent_quiz=ff2d7022- be0a-11da-9f01-00400506faf5 -> /question/new?parent_quiz=ff2d7022- be0a-11da-9f01-00400506faf5 ------------------------------ Parent = nil ------------------------------...
2006 Mar 12
2
Ruby syntax question, I think ...
...39; really mean"? I think I am missing a subtlety of Ruby syntax here, since the question_controller is actually trying to call the Question constructor. Can someone point out what I am missing please? Thanks in advance. question_controller: def new @question = Question.new(params[:parent_quiz]) end question.rb: def new (quiz) quiz = quiz end Application trace: /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1333:in `attributes='' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1188:in `initialize_without_callbacks...
2006 Mar 15
8
Tags to ruby interface: What I am missing? (repost)
I offer my apologies in advance for the repost. On a list as busy as this, it is sometimes easy to get missed in the shuffle. I am trying to create, display and edit a referenced object''s text field on the same view as my root object. For example: ------------------------- Quiz: <<quiz.name>> Preamble: <<quiz.preamble_presentation.text>> Postamble: