Class: Event
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Event
- Defined in:
- app/models/event.rb
Instance Method Summary collapse
Instance Method Details
#color ⇒ Object
24 25 26 27 |
# File 'app/models/event.rb', line 24 def color c = attributes['color'] c.blank?? 'black' : c end |
#dated_title ⇒ Object
16 17 18 |
# File 'app/models/event.rb', line 16 def dated_title "#{I18n.localize(start_at.to_date)}: #{title}" end |
#timed_title ⇒ Object
20 21 22 |
# File 'app/models/event.rb', line 20 def timed_title "#{I18n.localize(start_at, "")}: #{title}" end |