search for: mtask

Displaying 1 result from an estimated 1 matches for "mtask".

Did you mean: mask
2007 Feb 12
2
Objects in Arrays? Allowed, right?
...d objects to an instance variable that is just an array of objects. Here''s my controller code: @tasks = Task.find(:all, :conditions => "entity_id = #{session[:user].id}") for t in @tasks if Subtasks.find(:first, :conditions => "child_id = #{t.id}") != nil @mtasks << t end end However, when I execute, I get an error: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occurred while evaluating nil.<< Am i incorrectly referencing the object "t"? I haven''t previ...