From 131d0d269a9f7423f468af15c61baa297d281cba Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Mon, 22 Aug 2016 15:18:02 +0200 Subject: [PATCH 1/3] fixes edit experiment --- app/controllers/experiments_controller.rb | 2 +- config/locales/en.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/experiments_controller.rb b/app/controllers/experiments_controller.rb index dd0428bea..b9d063b36 100644 --- a/app/controllers/experiments_controller.rb +++ b/app/controllers/experiments_controller.rb @@ -69,7 +69,7 @@ class ExperimentsController < ApplicationController flash[:success] = t('experiments.update.success_flash', experiment: @experiment.name) - redirect_to project_path(@experiment.project) + redirect_to :back else flash[:alert] = t('experiments.update.error_flash') redirect_to :back diff --git a/config/locales/en.yml b/config/locales/en.yml index 54bcf5cba..60a065421 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -602,8 +602,8 @@ en: name_placeholder: 'My experiment' description: 'Description' edit: - modal_title: 'Edit experiment %{experiment}' - modal_create: 'Update experiment' + modal_title: 'Edit experiment details' + modal_create: 'Save' label_title: "Edit details" panel_label: 'Change details' create: From 75c52d20e5b61b9f641f328603f841c1e1bf1c38 Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Mon, 22 Aug 2016 15:30:27 +0200 Subject: [PATCH 2/3] fixes hound --- app/controllers/experiments_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/experiments_controller.rb b/app/controllers/experiments_controller.rb index b9d063b36..475204e21 100644 --- a/app/controllers/experiments_controller.rb +++ b/app/controllers/experiments_controller.rb @@ -68,12 +68,10 @@ class ExperimentsController < ApplicationController if @experiment.save flash[:success] = t('experiments.update.success_flash', experiment: @experiment.name) - - redirect_to :back else flash[:alert] = t('experiments.update.error_flash') - redirect_to :back end + redirect_to :back end def archive From 322be64b5f0604786194cff358215115722a9a2e Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Tue, 23 Aug 2016 14:44:22 +0200 Subject: [PATCH 3/3] change experiment path --- app/controllers/experiments_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/experiments_controller.rb b/app/controllers/experiments_controller.rb index 475204e21..7a5a2aa3b 100644 --- a/app/controllers/experiments_controller.rb +++ b/app/controllers/experiments_controller.rb @@ -68,10 +68,11 @@ class ExperimentsController < ApplicationController if @experiment.save flash[:success] = t('experiments.update.success_flash', experiment: @experiment.name) + redirect_to canvas_experiment_path(@experiment) else flash[:alert] = t('experiments.update.error_flash') + redirect_to :back end - redirect_to :back end def archive