Rake: enable trusted_device for some gestionnaire

This commit is contained in:
simon lehericey 2018-11-08 17:53:19 +01:00
parent fb76197404
commit 7313ca0675

View file

@ -0,0 +1,8 @@
namespace :'activate_trusted_device_for_a-f' do
task run: :environment do
letters_a_to_f = ('a'..'f').to_a
Gestionnaire
.where("substr(email, 1, 1) IN (?)", letters_a_to_f)
.update_all(features: { "enable_email_login_token" => true })
end
end