Class: Mokio::Concerns::Common::Translations::CommonTranslation

Inherits:
Object
  • Object
show all
Defined in:
lib/mokio/concerns/common/controller_translations.rb

Overview

This is not exactly the concern but placed here to have all CommonController extensions in one place

Class Method Summary collapse

Class Method Details

.created(obj) ⇒ Object



9
10
11
# File 'lib/mokio/concerns/common/controller_translations.rb', line 9

def self.created(obj)
  I18n.t("#{class_name(obj)}.created", title: obj_title(obj))
end

.deleted(obj) ⇒ Object



25
26
27
# File 'lib/mokio/concerns/common/controller_translations.rb', line 25

def self.deleted(obj)
  I18n.t("#{class_name(obj)}.deleted", title: obj_title(obj))
end

.not_created(obj) ⇒ Object



13
14
15
# File 'lib/mokio/concerns/common/controller_translations.rb', line 13

def self.not_created(obj)
  I18n.t("#{class_name(obj)}.not_created", title: obj_title(obj))
end

.not_deleted(obj) ⇒ Object



29
30
31
# File 'lib/mokio/concerns/common/controller_translations.rb', line 29

def self.not_deleted(obj)
  I18n.t("#{class_name(obj)}.not_deleted", title: obj_title(obj))
end

.not_updated(obj) ⇒ Object



21
22
23
# File 'lib/mokio/concerns/common/controller_translations.rb', line 21

def self.not_updated(obj)
  I18n.t("#{class_name(obj)}.not_updated", title: obj_title(obj))
end

.update_active_false(obj) ⇒ Object



37
38
39
# File 'lib/mokio/concerns/common/controller_translations.rb', line 37

def self.update_active_false(obj)
  I18n.t("#{update_active_translation(obj)}.update_active_false", title: obj_title(obj))
end

.update_active_true(obj) ⇒ Object



33
34
35
# File 'lib/mokio/concerns/common/controller_translations.rb', line 33

def self.update_active_true(obj)
  I18n.t("#{update_active_translation(obj)}.update_active_true", title: obj_title(obj))
end

.updated(obj) ⇒ Object



17
18
19
# File 'lib/mokio/concerns/common/controller_translations.rb', line 17

def self.updated(obj)
  I18n.t("#{class_name(obj)}.updated", title: obj_title(obj))
end