diff --git a/tracks/app/views/projects/index.rhtml b/tracks/app/views/projects/index.rhtml
index feceae36..6ab77f89 100644
--- a/tracks/app/views/projects/index.rhtml
+++ b/tracks/app/views/projects/index.rhtml
@@ -25,10 +25,12 @@
<%= text_area 'project', 'description', "cols" => 30, "rows" => 4, "tabindex" => 2 %>
+ <% unless @contexts.empty? -%>
<%= text_field_tag("project[default_context_name]", @project.default_context.name, :tabindex => 3) %>
<%= render :partial => 'default_context_autocomplete' %>
+ <% end -%>
diff --git a/tracks/app/views/stats/_totals.rhtml b/tracks/app/views/stats/_totals.rhtml
index 806342c6..2edbbb88 100755
--- a/tracks/app/views/stats/_totals.rhtml
+++ b/tracks/app/views/stats/_totals.rhtml
@@ -7,7 +7,7 @@
Of those <%= @contexts.count(:conditions => ["hide = ?", false])%> are visible contexts and
<%= @contexts.count(:conditions => ["hide = ?", true]) %> are hidden contexts
-<% unless @actions.count == 0 -%>
+<% unless @actions.empty? -%>
You have <%= @actions.count(:conditions => "completed_at IS NULL") %> uncompleted actions of which <%= @actions.count(:conditions => "completed_at IS NULL AND NOT show_from IS NULL") %> are deferred actions.
diff --git a/tracks/app/views/stats/index.rhtml b/tracks/app/views/stats/index.rhtml index e7168fa8..ef76c9cf 100755 --- a/tracks/app/views/stats/index.rhtml +++ b/tracks/app/views/stats/index.rhtml @@ -3,7 +3,7 @@ <%= render :partial => 'totals' -%> -<% unless @actions.count == 0 -%> +<% unless @actions.empty? -%>