diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 547bb62b..8f257eee 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -405,7 +405,7 @@ module TodosHelper html += step + "({ go: function() {\r\n" end end - html += "}}) " * animation.count + html += "}}) " * animation.length return html + ";" end diff --git a/app/views/todos/destroy.js.erb b/app/views/todos/destroy.js.erb index 3ff53768..3b264ea9 100644 --- a/app/views/todos/destroy.js.erb +++ b/app/views/todos/destroy.js.erb @@ -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 --%> \ No newline at end of file +-%> diff --git a/app/views/todos/toggle_check.js.erb b/app/views/todos/toggle_check.js.erb index 80a956cb..e2426560 100644 --- a/app/views/todos/toggle_check.js.erb +++ b/app/views/todos/toggle_check.js.erb @@ -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 })) : "" %>"; -} \ No newline at end of file +}