Class: ShiftTrade
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ShiftTrade
- Defined in:
- app/models/shift_trade.rb
Overview
Schema Information
Table name: shift_trades
id :integer not null, primary key
status :string(255) default("initial")
candidate_id :integer
shift_id :integer
created_at :datetime
updated_at :datetime
Instance Method Summary collapse
Instance Method Details
#affirm ⇒ Object
21 22 23 24 |
# File 'app/models/shift_trade.rb', line 21 def affirm self.status = 'affirmative' save end |
#confirm ⇒ Object
36 37 38 39 40 41 |
# File 'app/models/shift_trade.rb', line 36 def confirm() self.status = 'confirmed' save self.candidate.confirm(self.id) end |
#ignore ⇒ Object
31 32 33 34 |
# File 'app/models/shift_trade.rb', line 31 def ignore self.status = 'ignored' save end |
#negate ⇒ Object
26 27 28 29 |
# File 'app/models/shift_trade.rb', line 26 def negate self.status = 'negative' save end |