Class: Spina::Inquiry

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
ActionView::Helpers::TextHelper
Defined in:
app/models/spina/inquiry.rb

Instance Method Summary collapse

Instance Method Details

#archive_if_spamObject



24
25
26
# File 'app/models/spina/inquiry.rb', line 24

def archive_if_spam
  self.archived = true if self.spam
end

#ham!Object



32
33
34
# File 'app/models/spina/inquiry.rb', line 32

def ham!
  update_attributes({spam: false}, without_protection: true)
end

#spam!Object



36
37
38
# File 'app/models/spina/inquiry.rb', line 36

def spam!
  update_attributes({spam: true}, without_protection: true)
end

#summaryObject



28
29
30
# File 'app/models/spina/inquiry.rb', line 28

def summary
  truncate(message, length: 120)
end