Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #12 from jtrupiano/rails3.1

Rails 3.1 TemplateHandler compatibility.
  • Loading branch information...
commit ac58b8674f064b31b4eb1ff39765e827aa92b99c 2 parents aed350e + c2c117e
@stevegraham stevegraham authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/railtie.rb
View
8 lib/railtie.rb
@@ -4,9 +4,9 @@ class Railtie < Rails::Railtie
module ActionView
class Template
module Handlers
- class TwiML < ::ActionView::Template::Handler
+ class TwiML
+ class_attribute :default_format
self.default_format = 'text/xml'
- include ::ActionView::Template::Handlers::Compilable
def compile(template)
<<-EOS
@@ -14,6 +14,10 @@ def compile(template)
Twilio::TwiML.build { |res| #{template.source} }
EOS
end
+
+ def self.call(template)
+ new.compile(template)
+ end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.