From 5100bf4c13fdc609d6d657c6f43098796044d89b Mon Sep 17 00:00:00 2001 From: Nishanth Vijayan Date: Wed, 28 Sep 2016 18:50:40 +0530 Subject: [PATCH] Add comment about displaying associated model object name in _object_changes --- app/views/shared/_object_changes.html.haml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/views/shared/_object_changes.html.haml b/app/views/shared/_object_changes.html.haml index 69a9dd80..247f0461 100644 --- a/app/views/shared/_object_changes.html.haml +++ b/app/views/shared/_object_changes.html.haml @@ -17,6 +17,9 @@ %tr %td= attribute + / If the attribute is an associated model, show the value of the record it corresponds to, not just the ID. + / Eg. when the version is of an Event, if the attribute is event_type_id it shows + / Workshop (ID: 116) instead of just 116 - if attribute.include?('_id') - model_name = attribute.chomp('_id').camelize - if version.event != 'create'