search for: question_controller

Displaying 6 results from an estimated 6 matches for "question_controller".

2006 Mar 12
2
Ruby syntax question, I think ...
I am successfully navigating between controllers. However, I am unable to construct a new child (question) record. What does "undefined method `stringify_keys!'' 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/ru...
2006 Jul 07
2
disabling a layout before calling javascript window.open
Hi, I have some code in which i open a pop up when a user clicks on a link. However, the new popup window comes with the layout of the page on which the user clicked the link. I would like to remove the layout only from the new window which is created with the javascript window.open - any ideas thanks -- Posted via http://www.ruby-forum.com/.
2006 Apr 01
0
Okay, what gives? find_by_id is failing.
...r has_many :answers, :order => :seq belongs_to :presentation, :class_name => "Presentations", :foreign_key => :presentation_id belongs_to :parent, :class_name => "Quiz" acts_as_list :scope => :parent_id, :column => :seq end Here is the code for question_controller: def create # changed because we are instantiating the presentations here # may not be 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 aParent = Quiz.find_by_id(p...
2006 Apr 20
1
Rails is losing key information
...belongs_to :explanation_presentation, :class_name => "Presentations", :foreign_key => :presentation_id belongs_to :parent, :class_name => "Quiz" acts_as_list :scope => :parent_id, :column => :seq end ----------------------------------- Create method from question_controller.rb ----------------------------------- def create # changed because we are instantiating the presentations here # may not be needed if we instantiate presentations in the initialize, # but that will require thinking because we already have a use for # the initialize method. @question = Questi...
2006 Jun 03
12
How to get dynamically created inputs from html form back to rails app
...ose rows back to the rails application? The specific example is a screen for editing a question with its list of answers as a sovereign application. Both code snips are from views/question/_form.rhtml. I realize that I do not have the server side of the interface represented from controllers/question_controller.rb. In part, this is because I have a gap in my knowledge about what the HTTP post will provide back to the ruby app - it is presumed to be self evident in the books I have available. The following javascript is the code that inserts the new row into the table in the browser context (not the b...
2006 Apr 01
12
Repost: Why is rails generating bad SQL?
It looks like I am missing something obvious. ActiveRecord is generating _really_ bad SQL for this configuration, and I can''t quite figure it out. I''ve instrumented ActiveRecord enough to localize the problem somewhat, and generally by this time I would have a good idea of what I was missing because it''s all in the source. It appears that something in