Class: Campagne::CampagneDeliveriesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Campagne::CampagneDeliveriesController
- Defined in:
- app/controllers/campagne/campagne_deliveries_controller.rb
Instance Method Summary collapse
Instance Method Details
#bounce ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'app/controllers/campagne/campagne_deliveries_controller.rb', line 29 def bounce if delivery = CampagneDelivery.find_by_token(params[:token]) delivery.bounce! render :text => 'Ok' else render :text => 'Error' end end |
#click ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/controllers/campagne/campagne_deliveries_controller.rb', line 12 def click if delivery = CampagneDelivery.find_by_token(params[:token]) delivery.click!(request) end # TODO: redirect_to "http://#{params[:link]}" end |
#see ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/controllers/campagne/campagne_deliveries_controller.rb', line 4 def see if delivery = CampagneDelivery.find_by_token(params[:token]) delivery.see!(request) end image = File.read(File.join(Rails.root, "public/1x1.gif")) send_data image, :type => "image/gif", :disposition => "inline" end |
#unsubscribe ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'app/controllers/campagne/campagne_deliveries_controller.rb', line 20 def unsubscribe if delivery = CampagneDelivery.find_by_token(params[:token]) delivery.unsubscribe!(request) render :text => 'Ok' else render :text => 'Error' end end |