Sha256: 2e46a924c8204cb530776001868fd0f3fdc147d7edb51723cf31678b163a6c3b

Contents?: true

Size: 218 Bytes

Versions: 2

Compression:

Stored size: 218 Bytes

Contents

namespace :reffiliate do
  task :generate => :environment do
    Spree.user_class.all.each do |user|
      if user.referral.nil?
        user.create_referral
      end
    end
    puts "Referrals generated."
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_reffiliate-2.4.1 lib/tasks/spree_reffiliate.rake
spree_reffiliate-2.3.1 lib/tasks/spree_reffiliate.rake