From 3e72f29bfd2b925ea7584a76e6d887d8e3151d70 Mon Sep 17 00:00:00 2001 From: Jure Grabnar Date: Wed, 10 Aug 2016 13:48:28 +0200 Subject: [PATCH] Fix uploading of step assets --- app/controllers/steps_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/steps_controller.rb b/app/controllers/steps_controller.rb index 3666c7888..c3a1395cb 100644 --- a/app/controllers/steps_controller.rb +++ b/app/controllers/steps_controller.rb @@ -70,7 +70,7 @@ class StepsController < ApplicationController Activity.create( type_of: :create_step, user: current_user, - project: @my_module.project, + project: @my_module.experiment.project, my_module: @my_module, message: t( "activities.create_step", @@ -183,7 +183,7 @@ class StepsController < ApplicationController Activity.create( type_of: :edit_step, user: current_user, - project: @my_module.project, + project: @my_module.experiment.project, my_module: @my_module, message: t( "activities.edit_step", @@ -292,7 +292,7 @@ class StepsController < ApplicationController if protocol.in_module? Activity.create( user: current_user, - project: protocol.my_module.project, + project: protocol.my_module.experiment.project, my_module: protocol.my_module, message: message, type_of: checked ? :check_step_checklist_item : :uncheck_step_checklist_item @@ -360,7 +360,7 @@ class StepsController < ApplicationController if protocol.in_module? Activity.create( user: current_user, - project: protocol.my_module.project, + project: protocol.my_module.experiment.project, my_module: protocol.my_module, message: message, type_of: completed ? :complete_step : :uncomplete_step