Module: Audited::Ui::AuditsHelper

Defined in:
app/helpers/audited/ui/audits_helper.rb

Instance Method Summary collapse

Instance Method Details

#title(auditable, auditable_type) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'app/helpers/audited/ui/audits_helper.rb', line 4

def title(auditable, auditable_type)
  if auditable.present?
    I18n.t "audited.ui.audits.index.title.auditable", auditable: auditable.to_s
  elsif auditable_type.present?
    I18n.t "audited.ui.audits.index.title.auditable_type", auditable_type: auditable_type.to_s.humanize.pluralize.downcase
  else
    I18n.t "audited.ui.audits.index.title.all"
  end
end