namespace :assets do
  desc "Mark an asset as deleted"
  task :delete, [:id] => :environment do |_t, args|
    Asset.find(args.fetch(:id)).delete
  end

  desc "Mark an asset as deleted and remove from S3"
  task :delete_and_remove_from_s3, [:id] => :environment do |_t, args|
    asset = Asset.find(args.fetch(:id))
    asset.delete
    Services.cloud_storage.delete(asset)
  end
end

namespace :assets do
  desc "Mark an asset as deleted and remove from S3"
  task :delete_and_remove_from_s3, [:id] => :environment do |_t, args|
    asset = Asset.find(args.fetch(:id))
    asset.delete
    Services.cloud_storage.delete(asset)
  end
end

--- 
+++ 
@@ -1,4 +1,9 @@
 namespace :assets do
+  desc "Mark an asset as deleted"
+  task :delete, [:id] => :environment do |_t, args|
+    Asset.find(args.fetch(:id)).delete
+  end
+
   desc "Mark an asset as deleted and remove from S3"
   task :delete_and_remove_from_s3, [:id] => :environment do |_t, args|
     asset = Asset.find(args.fetch(:id))
Add a Rake task to mark an asset as deleted

This doesn't delete the file from S3.
