Class: SnitchReporting::SnitchTracker
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- SnitchReporting::SnitchTracker
- Defined in:
- app/models/snitch_reporting/snitch_tracker.rb
Overview
belongs_to :snitch_report date :date bigint :count
Class Method Summary collapse
Class Method Details
.tracker_for_date(date = nil) ⇒ Object
8 9 10 11 12 |
# File 'app/models/snitch_reporting/snitch_tracker.rb', line 8 def self.tracker_for_date(date=nil) date ||= Date.today find_or_create_by(date: date) end |