Class: StatBoard::Reports::MonthlyReport
- Inherits:
-
Report
- Object
- Report
- StatBoard::Reports::MonthlyReport
show all
- Defined in:
- lib/stat_board/reports/monthly_report.rb
Instance Attribute Summary
Attributes inherited from Report
#end_date, #start_date
Instance Method Summary
collapse
Methods inherited from Report
#count, #initialize, #slug
Instance Method Details
#name ⇒ Object
4
5
6
|
# File 'lib/stat_board/reports/monthly_report.rb', line 4
def name
"Last 30 days"
end
|
#scope(model) ⇒ Object
8
9
10
|
# File 'lib/stat_board/reports/monthly_report.rb', line 8
def scope(model)
super.where(["created_at > ? AND created_at < ?", end_date - 30.days, end_date + 1.day])
end
|