From e7495e32b766dd9e251d083f27eb48115d41be62 Mon Sep 17 00:00:00 2001 From: Carsten Otto Date: Fri, 22 May 2015 22:55:58 +0200 Subject: [PATCH] remove redundant code --- app/views/todos/destroy.js.erb | 2 +- app/views/todos/toggle_check.js.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/todos/destroy.js.erb b/app/views/todos/destroy.js.erb index 5848f716..fa895ef5 100644 --- a/app/views/todos/destroy.js.erb +++ b/app/views/todos/destroy.js.erb @@ -28,7 +28,7 @@ function show_empty_messages() { } function remove_todo_from_page() { - <% if (@remaining_in_context == 0) && update_needs_to_hide_container + <% if update_needs_to_hide_container # remove context with deleted todo -%> $('#<%=item_container_id(@todo)%>').fadeOut(400, function() { diff --git a/app/views/todos/toggle_check.js.erb b/app/views/todos/toggle_check.js.erb index 74aa9167..6729a805 100644 --- a/app/views/todos/toggle_check.js.erb +++ b/app/views/todos/toggle_check.js.erb @@ -34,7 +34,7 @@ var <%= object_name %> = { redirect_to(path); }, remove_todo: function(next_steps) { - <% if (@remaining_in_context == 0) && update_needs_to_hide_container + <% if update_needs_to_hide_container # remove context with deleted todo -%> $('#<%= item_container_id(@original_item)%>').slideUp(400, function() {