fix #1150 by nog using ruby1.8.7 Array.count but Array.length for 1.8.6 compat

This commit is contained in:
Reinier Balt 2011-04-19 13:42:05 +02:00
parent c0115eacd7
commit 539e18d87e
3 changed files with 5 additions and 5 deletions

View file

@ -405,7 +405,7 @@ module TodosHelper
html += step + "({ go: function() {\r\n"
end
end
html += "}}) " * animation.count
html += "}}) " * animation.length
return html + ";"
end

View file

@ -56,7 +56,7 @@ function show_new_todo_if_todo_was_recurring() {
$('#<%= dom_id(@new_recurring_todo, 'line')%>').effect('highlight', {}, 2000 );
TracksPages.page_notify('notice', "<%=t('todos.recurring_action_deleted')%>", 5);
<% else -%>
<% if @todo.recurring_todo.todos.active.count == 0 && @new_recurring_todo.nil? -%>
<% if @todo.recurring_todo.todos.active.count(:all) == 0 && @new_recurring_todo.nil? -%>
TracksPages.page_notify('notice', "<%=t('todos.completed_recurrence_completed')%>", 5);
<% end -%>
<% end -%>
@ -90,4 +90,4 @@ function html_for_new_recurring_todo() {
<% end
# if @saved
-%>
-%>

View file

@ -76,7 +76,7 @@ function add_new_recurring_todo(next_steps) {
highlight_updated_recurring_todo(next_steps);
});
<% else
if @todo.recurring_todo.todos.active.count == 0 && @new_recurring_todo.nil? -%>
if @todo.recurring_todo.todos.active.count(:all) == 0 && @new_recurring_todo.nil? -%>
TracksPages.page_notify('notice', "<%=t('todos.recurrence_completed')%>", 6);
<% end -%>
next_steps.go();
@ -167,4 +167,4 @@ function html_for_todo() {
function html_for_recurring_todo() {
return "<%= @saved ? escape_javascript(render(:partial => @new_recurring_todo, :locals => { :parent_container_type => parent_container_type })) : "" %>";
}
}