Sha256: 994ffb7c1672dd051b3bb4052df9070ebc6030b91dbf3e1593ebe339ec59a01e
Contents?: true
Size: 468 Bytes
Versions: 13
Compression:
Stored size: 468 Bytes
Contents
namespace :attached do desc "Process a given 'model' and 'attachment'." task :process, :model, :attachment, :needs => :environment do |t, args| model = args[:model] or raise "must specify model" attachment = args[:attachment] or raise "must specify attachment" klass = model.camelize.constantize or raise "invalid model '#{model}'" klass.all.each do |instance| instance.send(attachment).reprocess! end end end
Version data entries
13 entries across 13 versions & 1 rubygems