Add updated_by information for entity journal updates
This commit is contained in:
parent
51109b29b4
commit
ad567c84fa
@ -23,7 +23,9 @@ class AdditionalsJournalsController < ApplicationController
|
|||||||
def update
|
def update
|
||||||
return render_403 unless @journal.editable_by? User.current
|
return render_403 unless @journal.editable_by? User.current
|
||||||
|
|
||||||
@journal.safe_attributes = params[:journal]
|
journal_attributes = params[:journal]
|
||||||
|
journal_attributes[:updated_by] = User.current
|
||||||
|
@journal.safe_attributes = journal_attributes
|
||||||
@journal.save
|
@journal.save
|
||||||
@journal.destroy if @journal.details.empty? && @journal.notes.blank?
|
@journal.destroy if @journal.details.empty? && @journal.notes.blank?
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
Loading…
Reference in New Issue
Block a user