diff options
| -rw-r--r-- | app/helpers/application_helper.rb | 2 | ||||
| -rw-r--r-- | app/views/shared/_development_toolbar.html.slim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 702ca0ffc..7a3f7e719 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -36,7 +36,7 @@ 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.has_metadata? + if object.try(:has_metadata?) author = object.metadata.modifier_username || t('default_whodunnit') info = "#{info} <br/> #{t('whodunnit', author: author)}" end diff --git a/app/views/shared/_development_toolbar.html.slim b/app/views/shared/_development_toolbar.html.slim index 836066b3d..1d45c41d0 100644 --- a/app/views/shared/_development_toolbar.html.slim +++ b/app/views/shared/_development_toolbar.html.slim @@ -1,4 +1,4 @@ -- if Rails.application.config.development_toolbar +- if Rails.application.config.development_toolbar && current_user = modalbox 'development-toolbar' do = form_tag development_toolbar_update_settings_path, authenticity_token: true do .modal-header |
