Module: DateBook::ActsAsEventOccurrence::InstanceMethods
- Defined in:
- lib/date_book/concerns/acts_as_event_occurrence.rb
Overview
Instance Methods
Instance Method Summary collapse
- #end_moment ⇒ Object (also: #end)
- #popover_url ⇒ Object
- #start_moment ⇒ Object (also: #start)
- #url ⇒ Object
Instance Method Details
#end_moment ⇒ Object Also known as: end
56 57 58 59 60 61 62 |
# File 'lib/date_book/concerns/acts_as_event_occurrence.rb', line 56 def end_moment if schedule.all_day I18n.localize end_date, format: :moment_date else I18n.localize end_date, format: :moment_datetime end end |
#popover_url ⇒ Object
43 44 45 |
# File 'lib/date_book/concerns/acts_as_event_occurrence.rb', line 43 def popover_url event.popover_url(self) end |
#start_moment ⇒ Object Also known as: start
47 48 49 50 51 52 53 |
# File 'lib/date_book/concerns/acts_as_event_occurrence.rb', line 47 def start_moment if schedule.all_day I18n.localize date, format: :moment_date else I18n.localize date, format: :moment_datetime end end |
#url ⇒ Object
39 40 41 |
# File 'lib/date_book/concerns/acts_as_event_occurrence.rb', line 39 def url event.url(self) end |