Module: HasActivity::ActivitizeCalculations::OverallMethods
- Defined in:
- lib/has_activity/activitize_calculations.rb
Instance Method Summary collapse
- #activity_between(between_start, between_end, options = {}) ⇒ Object
- #activity_since(since, options = {}) ⇒ Object
Instance Method Details
#activity_between(between_start, between_end, options = {}) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/has_activity/activitize_calculations.rb', line 10 def activity_between(between_start, between_end, ={}) # Normalize dates... start_and_end = [between_start.to_time, between_end.to_time] if between_start > between_end start_and_end = start_and_end.reverse end calculate_activity(*start_and_end, .merge(:between => true)) end |
#activity_since(since, options = {}) ⇒ Object
19 20 21 |
# File 'lib/has_activity/activitize_calculations.rb', line 19 def activity_since(since, ={}) calculate_activity(since.to_time, Time.now, ) end |