Class: Seedy::Emails

Inherits:
Record show all
Defined in:
lib/seedy/records/emails.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Record

#initialize, #inspect, #to_s, #to_sql

Constructor Details

This class inherits a constructor from Seedy::Record

Class Method Details

.build(user, team, account) ⇒ Object



18
19
20
21
22
# File 'lib/seedy/records/emails.rb', line 18

def build(user, team, )
  email = Emails.new
  email.associate(user,team)
  email
end

Instance Method Details

#associate(user, team) ⇒ Object



25
26
27
28
29
30
# File 'lib/seedy/records/emails.rb', line 25

def associate(user, team)
  write_attribute(:modified_user_id, user.id)
  write_attribute(:assigned_user_id, user.id)
  write_attribute(:team_id, team)
  write_attribute(:created_by, user.id)
end