From a9e40a3d80435431f689b8d19005dd77a8f50224 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 22 Oct 2016 19:38:47 +0200 Subject: Adding OAuth access scopes, fixing OAuth authorization UI, adding rate limiting to the API --- lib/tasks/mastodon.rake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/tasks/mastodon.rake') diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 78def7b51..94da0904c 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -2,9 +2,7 @@ namespace :mastodon do namespace :media do desc 'Removes media attachments that have not been assigned to any status for longer than a day' task clear: :environment do - MediaAttachment.where(status_id: nil).where('created_at < ?', 1.day.ago).find_each do |m| - m.destroy - end + MediaAttachment.where(status_id: nil).where('created_at < ?', 1.day.ago).find_each(&:destroy) end end -- cgit