Last active
September 26, 2016 14:09
-
-
Save serenaf/8dd2ff9d7bb94445de45a32f06f461cd to your computer and use it in GitHub Desktop.
Opt in Acquire Lite Apps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opt_ins = [] | |
App.find_each do |app| | |
if app.can_use_feature?(:welcome_message) && !app.can_use_feature?(:visitor_auto_messaging) && PermittedLanguage.where(app_id: app.id).count > 1 | |
opt_ins << app.id | |
end | |
end | |
opt_ins | |
app = a 6 | |
admin = app.admins.where(email: 'serena@intercom.io').first | |
feature = Feature.fetch_by_name('acquire-lite-localisation-support') | |
feature.opt_in_apps(opt_ins, admin) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Moved to a rake task, see https://github.com/intercom/intercom/pull/59100/files