Skip to content

Instantly share code, notes, and snippets.

@serenaf
Last active September 26, 2016 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save serenaf/8dd2ff9d7bb94445de45a32f06f461cd to your computer and use it in GitHub Desktop.
Save serenaf/8dd2ff9d7bb94445de45a32f06f461cd to your computer and use it in GitHub Desktop.
Opt in Acquire Lite Apps
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)
@serenaf
Copy link
Author

serenaf commented Sep 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment