Class: Chatty::Chat

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
PublicActivity::Model
Defined in:
app/models/chatty/chat.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.translated_statesObject



29
30
31
32
33
34
35
# File 'app/models/chatty/chat.rb', line 29

def self.translated_states
  return {
    _("New") => "new",
    _("Handled") => "handled",
    _("Closed") => "closed"
  }
end

Instance Method Details

#jsonObject



22
23
24
25
26
27
# File 'app/models/chatty/chat.rb', line 22

def json
  return {
    :id => id,
    :state => state
  }
end