My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members

UPDATE: Will move this over to github soon

... going to http://github.com/hbhanoo/Twilio-Rails

Code to make developing twilio applications (even) easier in rails.

As easy as:

# environment.rb
Rails::Initializer.run do |config|
...
  config.gem :trails
...
 class ApplicationController < ActionController::Base
 ..
	include Trails::Twilio::CallHandling
 ..
 end

example controller code

    respond_to do |format|
      format.html # index.html.erb
      format.twiml do # index.twiml.builder
        logger.debug{ "incoming!: got digits: [#{incoming_call.digits.inspect}]" }
        if( !incoming_call.digits.blank? )
            case incoming_call.digits.to_i
            when 0 # create
              logger.debug{ "blah" }
            else # 
              logger.debug{ "not 0" }
          end # if '#'
        end # if digits
      end

Also includes support for functional tests:

    as_twilio { get :index }
    assert_response :success
    assert_tag( :tag => 'gather', 
                :child => {:tag => 'say'}, 
                :parent => {:tag => 'response'} )
  • Please post issues as you find them
  • Looking for contributions - there's still holes to plug! :)
Powered by Google Project Hosting