On 24 October 2012 22:01, Werner L. [email protected]
Am 24.10.2012 um 22:32 schrieb Colin L. [email protected]:
Please don’t top post, it makes it difficult to follow the thread.
Insert your reply at appropriate points in previous message. Thanks.
<%= f.collection_select :parent_id, Project.mainprojects.active, :id,
:project_name, :include_blank => ‘Partproject?’, :allow_nil => true%>
the project_id … 1, 2 etc. or “”
You said in your initial post that you were testing it in the model.
What do you mean by “parent_id” => “”? In the model it should
probably be an attribute self.parent_id, but in that case I would
expect it to be nil if it is a foreign key.
If you are trying to test it in the controller then it depends what
you are trying to do. Show us the code you have tried (for the
action, not just one line out of context).