search for: question_text

Displaying 5 results from an estimated 5 matches for "question_text".

2006 Dec 01
2
more_like_this not working?
Hi all, using ferret 0.10.13 and aaf trunk, i cannot get more_like_this to work. I read other posts on this forum related to that, but that did not solve it. I have a model Question with a field question_text. I do: ----------------------------------------------- >> q = Question.find(:first) >> q.more_like_this NoMethodError: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.each from ./scr...
2006 Mar 15
7
Populating text_tag with serialized data
I am using a serialized attribute in one of my models The serialized data is in the form of an array. I want to have a text_tag for each element contained in my serialized attribute. How would I construct the text_tag? My model name is ''questions''. The serialized attribute is "answers" So I might have: <% form tag %> <% text_tag ''question'',
2006 Apr 24
4
Does Rails need more useful form helpers?
I have been using rails professionally for only a month and a half now, but I am continually running into problems with form helpers and accessing multiple objects on a single page. To whit: 1. While text_field and text_area and such all support the :index option, the select helper does not. 2. When appending the text ''[]'' to a helper''s object name, the id is
2006 Mar 16
0
validating presence of a tag
Hi, I''m using acts_as_taggable. I have a form that asks for a question and a tag for that question, something like: <% form_tag -%> <%= text_area("question", "question_text") %> <%= text_field("tag", "name") %> <%= submit_tag %> <% end_form_tag %> The question is one model. Tag is another. My problem is that I can''t figure out how to validate that the user inputs a tag. He must input both a question and a tag....
2006 Jan 02
1
Dealing with collections of model objects
...flash[:error] %> <div id="error"><%= flash[:error] %></div> <% end %> <%= start_form_tag :action => ''complete_request'' %> <table> <% @answers.each do |answer|%> <tr> <td><%= answer.question_text %></td> <td><%= text_field ''answer[]'', ''text'' %> </td> </tr> <% end %> </table> <%= submit_tag "Submit" %> <%= end_form_tag %> ------- Unfortunately, that simple code does...