Listing updated champs, saving only champs changed
This commit is contained in:
parent
45d5177d52
commit
f0d0bfc427
2 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@ class ChampsService
|
|||
end
|
||||
end
|
||||
|
||||
champ.save
|
||||
champ.save if champ.changed?
|
||||
end
|
||||
|
||||
errors
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
.updated-at= notification.updated_at.strftime('%d/%m/%Y %H:%M')
|
||||
- if ['champs', 'piece_justificative'].include?(notification.type_notif)
|
||||
- if notification.liste.size > 1
|
||||
.type= "Plusieurs attributs ont été changés, dont: #{notification.liste.last}"
|
||||
.type= "Plusieurs attributs ont été changés, dont: #{notification.liste.join(" ")}"
|
||||
- else
|
||||
.type= "Un attribut à été changé: #{notification.liste.last}"
|
||||
- else
|
||||
|
|
Loading…
Reference in a new issue