Even more candy for our dog

This commit is contained in:
Jure Grabnar 2016-08-16 09:15:29 +02:00
parent b25a7758db
commit a29b56b0bd
2 changed files with 6 additions and 7 deletions

View file

@ -125,7 +125,7 @@ class ExperimentsController < ApplicationController
project: project,
user: current_user,
message: I18n.t(
"activities.clone_experiment",
'activities.clone_experiment',
user: current_user.full_name,
experiment_new: cloned_experiment.name,
experiment_original: @experiment.name
@ -137,7 +137,7 @@ class ExperimentsController < ApplicationController
redirect_to canvas_experiment_path(cloned_experiment)
else
flash[:error] = t('experiments.clone.error_flash',
experiment: @experiment.name)
experiment: @experiment.name)
redirect_to project_path(@experiment.project)
end
end
@ -175,7 +175,7 @@ class ExperimentsController < ApplicationController
project: project,
user: current_user,
message: I18n.t(
"activities.move_experiment",
'activities.move_experiment',
user: current_user.full_name,
experiment: @experiment.name,
project_new: project.name,
@ -188,7 +188,7 @@ class ExperimentsController < ApplicationController
redirect_to canvas_experiment_path(@experiment)
else
flash[:error] = t('experiments.move.error_flash',
experiment: @experiment.name)
experiment: @experiment.name)
redirect_to project_path(@experiment.project)
end
end
@ -252,5 +252,4 @@ class ExperimentsController < ApplicationController
def choose_layout
action_name.in?(%w(index archive)) ? 'main' : 'fluid'
end
end

View file

@ -313,10 +313,10 @@ class Experiment < ActiveRecord::Base
format = 'Clone %d - %s'
i = 1
i += 1 while experiment_names.include?((format(format, i, name))[0, 50])
i += 1 while experiment_names.include?(format(format, i, name)[0, 50])
clone = Experiment.new(
name: (format(format, i, name))[0, 50],
name: format(format, i, name)[0, 50],
description: description,
created_by: current_user,
last_modified_by: current_user,