diff options
Diffstat (limited to 'reach_reports/reach_service.rb')
-rwxr-xr-x | reach_reports/reach_service.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/reach_reports/reach_service.rb b/reach_reports/reach_service.rb index fa4c0d7..2030dbd 100755 --- a/reach_reports/reach_service.rb +++ b/reach_reports/reach_service.rb @@ -12,10 +12,12 @@ end module ReachReports - def self.list_reports(type) + def self.list_reports(type, model_uri=nil) case type when /(?i)QMRF/ - ReachReports::QmrfReport.all.collect{ |r| r.report_uri }.join("\n")+"\n" + params = {} + params[:model_uri]=model_uri if model_uri + ReachReports::QmrfReport.all(params).collect{ |r| r.report_uri }.join("\n")+"\n" when /(?i)QPRF/ ReachReports::QprfReport.all.collect{ |r| r.report_uri }.join("\n")+"\n" end |