Skip to content

Instantly share code, notes, and snippets.

@jsierles
Created May 11, 2009 22:32
Show Gist options
  • Select an option

  • Save jsierles/110217 to your computer and use it in GitHub Desktop.

Select an option

Save jsierles/110217 to your computer and use it in GitHub Desktop.
# dialplan.rb
parking_lot_menu {
menu 'welcome', 'for-bush-st-press1', 'for-hyde-press2',
:timeout => 8.seconds, :tries => 3 do |link|
link.bush_st 1
link.hyde_st 2
}
bush_st {
# Here you may see we find the parking lot name
# based on the column 'name'
parking_lot = ParkingLot.find(:first,
:conditions => { :name => "Bush St" })
play "bush-st-has", parking_lot.spaces, "spaces-available"
}
hyde_st {
# Do the same thing here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment