Skip to content

Instantly share code, notes, and snippets.

@georgismitev
Created August 14, 2014 13:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save georgismitev/699f87e80292cb44f2e2 to your computer and use it in GitHub Desktop.
Save georgismitev/699f87e80292cb44f2e2 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