lib/trails/twilio/call_handling.rb in trails-1.1.2 vs lib/trails/twilio/call_handling.rb in trails-1.1.3
- old
+ new
@@ -3,11 +3,11 @@
module CallHandling
def self.included( klass )
raise "can\'t include #{self} in #{klass} - not a Controller?" unless
klass.respond_to?( :before_filter )
Mime::Type.register_alias( "text/html", :twiml ) unless Mime.const_defined?( 'TWIML' )
- klass.send( :before_filter, :setup_incoming_call )
+ klass.send( :prepend_before_filter, :setup_incoming_call )
klass.send( :attr_reader, :incoming_call )
klass.send( :alias_method_chain, :protect_against_forgery?, :twilio )
klass.send( :append_view_path, File.expand_path( File.join( File.dirname( __FILE__ ),
'../../../assets' ) ) )
klass.send( :alias_method_chain, :default_layout, :twilio )
@@ -27,10 +27,10 @@
is_twilio_call? ? false : protect_against_forgery_without_twilio?
end
def setup_incoming_call
return unless is_twilio_call?
- logger.debug( "at the beginning, request.params = #{request.parameters}" )
+ logger.debug{ "at the beginning, request.params = #{request.parameters}" }
request.format = :twiml
response.content_type = 'text/xml'
@incoming_call = Trails::Twilio::Incoming.new( request )
end