Class: Workarea::Insights::UpcomingReleases
- Defined in:
- app/models/workarea/insights/upcoming_releases.rb
Class Method Summary collapse
Methods inherited from Base
beginning_of_last_month, current, end_of_last_month, generate_daily!, generate_weekly!, #include?, #slug
Methods included from ApplicationDocument
Methods included from Sidekiq::Callbacks
add_worker, assert_valid_config!, async, caching_classes?, disable, enable, inline, #run_callbacks, workers, workers_list
Methods included from Mongoid::Document
Class Method Details
.dashboards ⇒ Object
5 6 7 |
# File 'app/models/workarea/insights/upcoming_releases.rb', line 5 def dashboards %w(store) end |
.generate_monthly! ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/models/workarea/insights/upcoming_releases.rb', line 9 def generate_monthly! releases = Release .scheduled .soonest .limit(Workarea.config.insights_releases_list_max_results) create!(results: releases.map { |r| { release_id: r.id } }) if releases.present? end |