Method: DateBook::ActsAsEvent::InstanceMethods#next_occurrence
- Defined in:
- lib/date_book/concerns/acts_as_event.rb
#next_occurrence(occurrence = nil) ⇒ Object
56 57 58 59 |
# File 'lib/date_book/concerns/acts_as_event.rb', line 56 def next_occurrence(occurrence = nil) after = occurrence.present? ? occurrence.end_date + 1.second : Time.now event_occurrences.ending_after(after).ascending.first end |