search for: question_type

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

2007 Nov 10
2
Problem with view spec - works inside the browser but spec fails with nil object
...a_etaria) @faixa_etaria = questions(:faixa_etaria) end it ''should display the "question 4" heading correctly'' do render ''survey/show'' end end Here''s the :faixa_etaria Question fixture I''m using: faixa_etaria: id: 1 question_type_id: 1 description: ''Em qual das faixas et?rias abaixo voc? se inclui?'' position: 4 (The description value is in Portuguese). Here''s the "show" method inside the SurveyController: def show @configurations = {} Configuration.find(:all).each { |c|...
2006 Jul 04
1
Smart html output for an object?
...can be easily printed into the html format I want. I''ve been focusing on using a case/when control structure, so let me start by showing you some code... I was trying to use this following code as a helper method, def print_question(question) @question = question case @question.question_type.code when ''free_response'' text_area(@question, :response, :id => "response_" + question.id.to_s, :cols => 40, :rows => 10) else "boo!" end end this is just mock up code, I can''t get this to work. Something a...
2012 Sep 29
0
rails 3.2 nested form names not correct
..._nested_Attributes set up properly. the question from the db show up, but the index is not incrementing: <%= f.fields_for :person_questions do |pregunta| %> Questions: <br/> <% Question.all.each do |question| %> <%= render ''questions/question_type'', :pregunta => pregunta, :question => question, :f => f %> <% end %> <% end %> <div class="control-group"> <%= f.label :date_of_problema, :class => ''control-label'' %> <div c...
2012 Oct 06
0
rails 3.2 question/answer with a through table
...t the questions in the db show up once each with the appropriate ones checked? The questions are in the db. Questions: <br/> <% Question.all.each do |question| %> <%= f.fields_for :person_questions do |pregunta| %> <%= render ''questions/question_type'', :pregunta => pregunta, :question => question, :f => f %> <% end %> <% end %> Partial: <div class="control-group"> <%= pregunta.label question.name, (question.label_text unless question.label_text.nil?), :class => '...
1998 Oct 19
1
domain_master_node_status_fail: ... Cannot sync browser lists.
...qdcount = 1 ancount = 0 nscount = 0 arcount = 0 } question = { question_name = { name = "*" scope = "" name_type = 0u } question_type = 33 question_class = 1 } answers = 0x00000000 nsrecs = 0x00000000 additional = 0x00000000 } dgram = { header = { msg_type = 10842 flags = { node_type = (B_NODE, (node_type)...
2011 Dec 13
3
Validates presence
Hi everyone, I just need a quick help :) What is the best way to write some code in :presence option? I have a Question model and one of the fields is question_type: - example question - static question Each question has alternatives, and each of them has scores What I want is to validate the presence of :score, but when its only on the static question. I dont want to validate the presence of the score in examples validates :score, :presence => {:if =&...