Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yannick/0b5e5bd1978eb5bc85e3 to your computer and use it in GitHub Desktop.
Save yannick/0b5e5bd1978eb5bc85e3 to your computer and use it in GitHub Desktop.
require 'cherti/all'
include Cherti
def create_ad_url_override(user_id, ad_url, lang='ad')
device_types = ['mobile', 'tablet', 'pc']
device_types.each do |dt|
AdUrl.find_or_create(:auth_provider => User[user_id].auth_provider, :device_type => dt, :lang => lang, :url => ad_url)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment