Module: Admin::AbuseReportsHelper
- Defined in:
- app/helpers/admin/abuse_reports_helper.rb
Instance Method Summary collapse
Instance Method Details
#abuse_report_data(report) ⇒ Object
19 20 21 22 23 24 |
# File 'app/helpers/admin/abuse_reports_helper.rb', line 19 def abuse_report_data(report) { abuse_report_data: Admin::AbuseReportDetailsSerializer.new.represent(report).to_json, abuse_reports_list_path: admin_abuse_reports_path } end |
#abuse_reports_list_data(reports) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/helpers/admin/abuse_reports_helper.rb', line 5 def abuse_reports_list_data(reports) { abuse_reports_data: { categories: AbuseReport.categories.keys, reports: Admin::AbuseReportSerializer.new.represent(reports), pagination: { current_page: reports.current_page, per_page: reports.limit_value, total_items: reports.total_count } }.to_json } end |