feat(champ): add updated_by column
This commit is contained in:
parent
9de97c8593
commit
68c15ba99f
10 changed files with 25 additions and 19 deletions
|
@ -7,7 +7,7 @@ class Champs::ChampController < ApplicationController
|
|||
def find_champ
|
||||
dossier = policy_scope(Dossier).includes(:champs, revision: [:types_de_champ]).find(params[:dossier_id])
|
||||
type_de_champ = dossier.find_type_de_champ_by_stable_id(params[:stable_id])
|
||||
dossier.champ_for_update(type_de_champ, params_row_id)
|
||||
dossier.champ_for_update(type_de_champ, params_row_id, updated_by: current_user.email)
|
||||
end
|
||||
|
||||
def params_row_id
|
||||
|
|
|
@ -274,7 +274,7 @@ module Instructeurs
|
|||
end
|
||||
|
||||
def update_annotations
|
||||
dossier_with_champs.update_champs_attributes(champs_private_attributes_params, :private)
|
||||
dossier_with_champs.update_champs_attributes(champs_private_attributes_params, :private, updated_by: current_user.email)
|
||||
if dossier.champs.any?(&:changed_for_autosave?)
|
||||
dossier.last_champ_private_updated_at = Time.zone.now
|
||||
end
|
||||
|
|
|
@ -551,7 +551,7 @@ module Users
|
|||
end
|
||||
|
||||
def update_dossier_and_compute_errors
|
||||
@dossier.update_champs_attributes(champs_public_attributes_params, :public)
|
||||
@dossier.update_champs_attributes(champs_public_attributes_params, :public, updated_by: current_user.email)
|
||||
if @dossier.champs.any?(&:changed_for_autosave?)
|
||||
@dossier.last_champ_updated_at = Time.zone.now
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue