Fix step comments

This commit is contained in:
Jure Grabnar 2016-08-10 13:51:24 +02:00
parent 3e72f29bfd
commit 52e6d7d300
2 changed files with 3 additions and 3 deletions

View file

@ -44,7 +44,7 @@ class ProjectCommentsController < ApplicationController
@comment = Comment.new(
message: comment_params[:message],
user: current_user)
respond_to do |format|
if (@comment.valid? && @project.comments << @comment)
@ -70,7 +70,7 @@ class ProjectCommentsController < ApplicationController
format.json {
render json: {
errors: @comment.errors.to_hash(true)
}
}
}
end
end

View file

@ -56,7 +56,7 @@ class StepCommentsController < ApplicationController
Activity.create(
type_of: :add_comment_to_step,
user: current_user,
project: @step.my_module.project,
project: @step.my_module.experiment.project,
my_module: @step.my_module,
message: t(
"activities.add_comment_to_step",