Class: TranslationCms::Api::Customers::Note

Inherits:
Base
  • Object
show all
Extended by:
EnumField::EnumeratedAttribute, HstoreTranslate::Translates
Defined in:
lib/translation_cms/api/customers/note.rb

Instance Method Summary collapse

Methods inherited from Base

all!, custom_scope!, default_attributes, destroy, dummy_resource!, #method_missing_with_translations_will_change, parsed!, path_with_custom_scope, resource_type!, update

Instance Method Details

#author_nameObject



20
21
22
# File 'lib/translation_cms/api/customers/note.rb', line 20

def author_name
  author_role_title
end

#dom_cssObject



24
25
26
27
28
29
30
31
# File 'lib/translation_cms/api/customers/note.rb', line 24

def dom_css
  case html_class
  when 'out'
    'chat_translator'
  else
    'chat_user'
  end
end

#parsed_created_atObject



16
17
18
# File 'lib/translation_cms/api/customers/note.rb', line 16

def parsed_created_at
  @parsed_created_at ||= Time.zone.parse(created_at)
end