I am creating a Rails application that monitors conversions on external sites. I would like to allow users to embed an image tag on their conversion pages (e.g. AdWords), and whenever this image is requested, a conversion is registered in my application.
respond_to do |format|
if @conversion.save
flash[:notice] = 'Conversion was successfully created.'
format.html { redirect_to(@conversion) }
format.xml { render :xml => @conversion, :status => :created, :location => @conversion }
format.js { render :json => @conversion, :status => :created }
format.gif { head :status => :ok }
else
format.html { render :action => "new" }
format.xml { render :xml => @conversion.errors, :status => :unprocessable_entity }
end
end
Thus, the browser receives a nonexistent .gif image. Is there a better way to do this?
source
share