Class: Ponch::TrackingController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/ponch/tracking_controller.rb

Instance Method Summary collapse

Instance Method Details

#pixelObject



3
4
5
6
7
8
9
10
# File 'app/controllers/ponch/tracking_controller.rb', line 3

def pixel
  ponch_delivery = Ponch::Delivery.find_by_code params[:code]

  ponch_delivery.open!(request.remote_ip) if ponch_delivery

  send_file File.expand_path('../../../../images/blank.gif', __FILE__),
            type: "image/gif", disposition: 'inline', stream: false
end