From 851f3700685ef8011bae3bb97709c8569dd32d6a Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 3 Apr 2013 19:35:03 -0400 Subject: [PATCH] Create XML for Twilio to read --- app/controllers/alerts_controller.rb | 1 + app/views/alerts/show.xml.builder | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 app/views/alerts/show.xml.builder diff --git a/app/controllers/alerts_controller.rb b/app/controllers/alerts_controller.rb index d5bd605..e01b0ea 100644 --- a/app/controllers/alerts_controller.rb +++ b/app/controllers/alerts_controller.rb @@ -17,6 +17,7 @@ class AlertsController < ApplicationController respond_to do |format| format.html # show.html.erb + format.xml # show.xml.builder format.json { render json: @alert } end end diff --git a/app/views/alerts/show.xml.builder b/app/views/alerts/show.xml.builder new file mode 100644 index 0000000..c20ecca --- /dev/null +++ b/app/views/alerts/show.xml.builder @@ -0,0 +1,4 @@ +xml.instruct! +xml.Response do + xml.Say @alert.class_name + ' is now available.', :voice => 'woman' +end \ No newline at end of file