Class: Chaskiq::Subscriber

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/chaskiq/subscriber.rb

Instance Method Summary collapse

Instance Method Details

#decoded_idObject



26
27
28
# File 'app/models/chaskiq/subscriber.rb', line 26

def decoded_id
  URLcrypt.decode(self.email)
end

#encoded_idObject



22
23
24
# File 'app/models/chaskiq/subscriber.rb', line 22

def encoded_id
  URLcrypt.encode(self.email)
end

#style_classObject



30
31
32
33
34
35
36
37
38
39
# File 'app/models/chaskiq/subscriber.rb', line 30

def style_class
  case self.state
  when "passive"
    "plain"
  when "subscribed"
    "information"
  when "unsusbscribed"
    "warning"
  end
end