Class: SportDb::Model::Event
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- SportDb::Model::Event
- Defined in:
- lib/sportdb/models/models/event.rb
Instance Method Summary collapse
Instance Method Details
#name ⇒ Object
31 32 33 34 |
# File 'lib/sportdb/models/models/event.rb', line 31 def name ## todo/fix: check attr_reader(:name) or such first if NOT nil !! "#{league.name} #{season.name}" end |
#on_before_save ⇒ Object
26 27 28 29 |
# File 'lib/sportdb/models/models/event.rb', line 26 def on_before_save # event key is composite of league + season (e.g. at.2012/13) etc. self.key = "#{league.key}.#{season.key}" end |