From 13cc26e5a536f2d0aab03604413249fbf0e87a7c Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Tue, 4 Feb 2014 04:40:14 -0500 Subject: [PATCH] handle clearing lock code --- .../app/controllers/more_actions_controller.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/episode-17-draft/app/controllers/more_actions_controller.rb b/episode-17-draft/app/controllers/more_actions_controller.rb index 2ba9eee..d211a0b 100644 --- a/episode-17-draft/app/controllers/more_actions_controller.rb +++ b/episode-17-draft/app/controllers/more_actions_controller.rb @@ -66,7 +66,7 @@ def tableView(tableView, didSelectRowAtIndexPath: indexPath) case text when CLEAR_LOCK_CODE_TEXT - App.alert 'clear lock code functionality is coming up' + handle_clearing_lock_code indexPath when SET_LOCK_CODE_TEXT self.navigationController.pushViewController(ManageLockCodeController.alloc.initAndSetCode, animated: true) @@ -81,6 +81,12 @@ def tableView(tableView, didSelectRowAtIndexPath: indexPath) private + def handle_clearing_lock_code indexPath + LockCode.set nil + App.alert 'Lock code has been cleared' + view.reloadData + end + def display_non_version_section indexPath, cell case indexPath.row when LOCK_CODE_ROW_NUMBER