Class: DayChanger

Inherits:
Object
  • Object
show all
Defined in:
app/models/day_changer.rb

Overview

This class adds new record to HouddHistory

Class Method Summary (collapse)

Class Method Details

+ (Object) add

Add one day to HouddHistory.



5
6
7
8
9
10
11
12
13
14
# File 'app/models/day_changer.rb', line 5

def self.add
  new_day = 1
  new_day = HouddHistory.last.day unless HouddHistory.last.blank?
  history = HouddHistory.new
  history.day = new_day
  history.save

  ProductionQueueUpdater.execute(1)
  MissionMatcher.execute
end