GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: A simple application written in merb to help you manage ad serving across multiple sites
Clone URL: git://github.com/kneath/greed.git
Protect against rendering campaign javascript for a spot without any 
active campaigns
kneath (author)
Fri Jun 06 01:02:53 -0700 2008
commit  11bc843a9ca313ac888e19b6709fbb49b53012f8
tree    487b2f53477185a470cbe94f76ac692f03032f78
parent  9576f738c9bb124f391c3e5ce8493e7f4de6a05d
...
4
5
6
 
7
8
9
...
4
5
6
7
8
9
10
0
@@ -4,6 +4,7 @@ class Server < Merb::Controller
0
   def spot
0
     @spot = Spot.find(params[:id])
0
     @campaign = @spot.campaign_for_serving
0
+ return render "/* No campaign available */", :layout => false, :format => :js if @campaign.nil?
0
     render_then_call(render(:layout => false, :format => :js)) do
0
       geo_ip = GeoIP.new(Merb.root / "data" / "GeoLiteCity.dat")
0
       geo_ip_data = geo_ip.city(request.remote_ip)

Comments

    No one has commented yet.