Sha256: 1061b67711341574f03c1f231c195e28b9b8cb61406dc7a6271b2bbf1d59e1a2

Contents?: true

Size: 451 Bytes

Versions: 1

Compression:

Stored size: 451 Bytes

Contents

desc 'Create caches for existing data'
namespace :review_and_approve do
  task :create_caches => :environment do
    puts "In review_and_approve:create_caches"
    ActiveRecord::Base.subclasses.select{|model| 
      model._using_rev_app? rescue false
      }.each do |model|
      
      puts "Processing #{model.name}"
      model.find_each do |obj|
        obj.review_and_approve_after_save_callback(true)
      end
      puts "\n"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
review_and_approve-0.0.4 lib/tasks/review_and_approve.rake