Class: Seedy::Cases
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
Instance Method Details
#associate(user, team, account) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/seedy/records/cases.rb', line 26 def associate(user, team, account) 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) join("accounts_cases", { :id => Random.guid, :account_id => account, :case_id => read_attribute(:id), :date_modified => read_attribute(:date_modified)}) end |