Class: Seedy::Accounts

Inherits:
Record
  • Object
show all
Defined in:
lib/seedy/records/accounts.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) ⇒ Object



35
36
37
38
39
# File 'lib/seedy/records/accounts.rb', line 35

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

Instance Method Details

#associate(user, team) ⇒ Object



42
43
44
45
46
47
# File 'lib/seedy/records/accounts.rb', line 42

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