Skip to content

Instantly share code, notes, and snippets.

@wesmaldonado
Created January 26, 2010 18:45
Show Gist options
  • Save wesmaldonado/287090 to your computer and use it in GitHub Desktop.
Save wesmaldonado/287090 to your computer and use it in GitHub Desktop.
def page_name_defined?( ad_position, options )
return false if !options.include?( "admin_page_name" )
apn = options.fetch( "admin_page_name" )
if options.include?("brand")
bnd = options.fetch("brand")
begin
return $ad_placements["BRANDS"].fetch(bnd).include?(apn)
rescue
return false
end
else
return $ad_placements.include?(apn)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment