Displaying 2 results from an estimated 2 matches for "not_don".
Did you mean:
not_done
2005 Jan 07
3
multicolumn primary keys in activerecord
hi,
I''ve got the following tables in mysql notation:
CREATE TABLE `nodes` (
`id` int(11) NOT NULL auto_increment,
`parent_id` int(11) default ''0'',
`group_id` int(11) default ''0'',
PRIMARY KEY (`id`),
);
CREATE TABLE `groups` (
`parent_id` int(11) NOT NULL default ''0'',
`id` int(11) NOT NULL auto_increment,
2007 Feb 13
1
Passing Arrays in recursive functions.
...children an those
children are full tasks so they can have children of their own, Tasks
can only be completed if they have no children, a task with children
is only completed if all its children are done. this much I have
working, I''m trying to add some Ajax support for toggling the done/
not_done flag on the view but I''m hitting a problem and I''m not sure
how to get around it.
[model]
def completed?
self.siblings.all? { |x| x.done } if self.parent
end
[controller]
def task_done
@task = Task.find(params[:id])
is_complete = !@task.done
ids_changed = task_...