Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

14 lines
515 B

include Rails.application.routes.url_helpers
namespace :onboarding_emails do
desc "Send onboarding emails to private beta users"
task :send, %i[organisation_id] => :environment do |_task, args|
organisation_id = args[:organisation_id]
raise "Organisation id must be provided" unless organisation_id
organisation = Organisation.find(organisation_id)
raise "Organisation #{organisation_id} does not exist" unless organisation
organisation.users.each(&:send_beta_onboarding_email)
end
end