4
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/trails/twilio/call_handling.rb', line 4
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( :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 )
end
|