From f71544f9286267cd0aa7424c9c32684f5dd16350 Mon Sep 17 00:00:00 2001 From: Andrei Malyshev Date: Mon, 19 Sep 2016 12:23:19 +0300 Subject: [PATCH 1/2] Add gherkin to gemfile.lock to fix bundle install for MRI --- Gemfile.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile.lock b/Gemfile.lock index 759579e244..1cadd419f8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -147,6 +147,7 @@ GEM faker (0.3.1) ffi (1.9.14-java) gchartrb (0.8) + gherkin (2.12.2) gherkin (2.12.2-java) multi_json (~> 1.3) gli (2.14.0) From 439e3db050a946fe1a69e5cada1c5237f789c6a8 Mon Sep 17 00:00:00 2001 From: Andrei Malyshev Date: Mon, 19 Sep 2016 12:25:47 +0300 Subject: [PATCH 2/2] Use redirect instead of render to avoid error with pagination. --- app/controllers/tasks_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index b43d8e980e..020823e6f5 100755 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -36,12 +36,12 @@ def new redirect_to edit_task_path(@task.task_num) else flash[:error] = t('.task_was_not_created') - render 'tasks/index' + redirect_to tasks_path end rescue => e flash[:error] = e.message - render 'tasks/index' + redirect_to tasks_path end def create @@ -452,12 +452,12 @@ def clone redirect_to edit_task_path(@task.task_num) else flash[:error] = t('.task_was_not_created') - render 'tasks/index' + redirect_to tasks_path end rescue => e flash[:error] = e.message - render 'tasks/index' + redirect_to tasks_path end # GET /tasks/score/:id