Class: Admin::ScreenedUrlsController
- Inherits:
-
StaffController
- Object
- StaffController
- Admin::ScreenedUrlsController
- Defined in:
- app/controllers/admin/screened_urls_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/admin/screened_urls_controller.rb', line 4 def index screened_urls = ScreenedUrl .select( "domain, sum(match_count) as match_count, max(last_match_at) as last_match_at, min(created_at) as created_at", ) .group(:domain) .order("last_match_at DESC") .to_a render_serialized(screened_urls, GroupedScreenedUrlSerializer) end |