Created
August 14, 2014 13:15
-
-
Save georgismitev/699f87e80292cb44f2e2 to your computer and use it in GitHub Desktop.
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
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