mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 10:14:17 +08:00
Fix step comments
This commit is contained in:
parent
3e72f29bfd
commit
52e6d7d300
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue