Module: Workarea::Email

Defined in:
app/models/workarea/email.rb,
app/models/workarea/email/signup.rb

Overview

TODO v4 get rid of this

Defined Under Namespace

Classes: Signup

Class Method Summary collapse

Class Method Details

.signed_up?(email) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/models/workarea/email.rb', line 14

def self.signed_up?(email)
  Workarea::Email::Signup.where(email: email).exists?
end

.signup(email) ⇒ self

Add an email address to the email sign ups list

Parameters:

Returns:

  • (self)


8
9
10
11
12
# File 'app/models/workarea/email.rb', line 8

def self.(email)
  unless email.blank?
    Workarea::Email::Signup.create(email: email)
  end
end

.unsignup(email) ⇒ Object



18
19
20
# File 'app/models/workarea/email.rb', line 18

def self.unsignup(email)
  Workarea::Email::Signup.where(email: email).destroy
end