saved_report.rb
Hipposoft 2011
Describe and record all parameters needed to generate reports.
13-Oct-2011 (ADH): Created.
Various constants used by the “20111013142252_add_saved_reports_support.rb” migration file and various pieces of application code
Return (and cache) a TrackRecordReport::Report instance based on the attributes of this SavedReport model instance. The result is cached for later access. If you alter attribute values, pass ‘true’ on entry to force a refresh of the cache and update the TrackRecordReport::Report instance.
# File app/models/saved_report.rb, line 88 def generate_report( flush_cache = false ) if ( @report.nil? || flush_cache ) # The TrackRecord internal Report object can be created from this # instance's attributes directly, except for many-to-many relationships, # which are not exposed in that hash and must be assigned manually. @report = TrackRecordReport::Report.new( user, attributes() ) @report.active_task_ids = active_task_ids @report.inactive_task_ids = inactive_task_ids @report.reportable_user_ids = reportable_user_ids end @report end