From d0784999c124c0b51b8e61a4c425fb1de7144224 Mon Sep 17 00:00:00 2001 From: lukemelia Date: Fri, 26 May 2006 19:46:10 +0000 Subject: [PATCH] Projects marked as complete will no longer show up in the add new action form. I also cleaned up a little bit of ruby Array code in the sidebar. The reject{} method can be used a lot where we have been using collect{ ... }.compact. Fixes #297. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@248 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/views/shared/_add_new_item_form.rhtml | 2 +- tracks/app/views/shared/sidebar.rhtml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tracks/app/views/shared/_add_new_item_form.rhtml b/tracks/app/views/shared/_add_new_item_form.rhtml index 425e4ab9..93c902f4 100644 --- a/tracks/app/views/shared/_add_new_item_form.rhtml +++ b/tracks/app/views/shared/_add_new_item_form.rhtml @@ -49,7 +49,7 @@ <% unless controller.controller_name == "project" -%>
- <%= collection_select( "todo", "project_id", @projects, "id", "name", + <%= collection_select( "todo", "project_id", @projects.reject{|p| p.done}, "id", "name", { :include_blank => true }, {"tabindex" => 4}) %>
<% end -%> diff --git a/tracks/app/views/shared/sidebar.rhtml b/tracks/app/views/shared/sidebar.rhtml index 4164b3a0..f15c090f 100644 --- a/tracks/app/views/shared/sidebar.rhtml +++ b/tracks/app/views/shared/sidebar.rhtml @@ -1,6 +1,6 @@

Active Projects: