diff options
| author | Zog | 2018-03-30 16:15:48 +0200 |
|---|---|---|
| committer | Zog | 2018-04-09 16:58:23 +0200 |
| commit | bf745bf731237f4d405065de5d386eaee2a2d131 (patch) | |
| tree | 584b5d6748deb095e399117c1f443bd7febed8d1 /app/helpers/application_helper.rb | |
| parent | 745428deb8e0df2c7c8a991ab8a5f5231e6d6c7f (diff) | |
| download | chouette-core-bf745bf731237f4d405065de5d386eaee2a2d131.tar.bz2 | |
Refs #6367; Add metadata to other versioned models
Diffstat (limited to 'app/helpers/application_helper.rb')
| -rw-r--r-- | app/helpers/application_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 63398a0a9..702ca0ffc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -36,8 +36,8 @@ module ApplicationHelper display = policy(object).synchronize? if policy(object).respond_to?(:synchronize?) rescue false if display info = t('last_update', time: l(object.updated_at, format: :short)) - if object.try(:versions) - author = object.versions.try(:last).try(:whodunnit) || t('default_whodunnit') + if object.has_metadata? + author = object.metadata.modifier_username || t('default_whodunnit') info = "#{info} <br/> #{t('whodunnit', author: author)}" end out += content_tag :div, info.html_safe, class: 'small last-update' |
