Class: Event

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/event.rb

Instance Method Summary collapse

Instance Method Details

#colorObject



24
25
26
27
# File 'app/models/event.rb', line 24

def color
  c = attributes['color']
  c.blank?? 'black' : c
end

#dated_titleObject



16
17
18
# File 'app/models/event.rb', line 16

def dated_title
  "#{I18n.localize(start_at.to_date)}: #{title}"
end

#timed_titleObject



20
21
22
# File 'app/models/event.rb', line 20

def timed_title
  "#{I18n.localize(start_at, "")}: #{title}"
end