diff options
author | spag <spag@golwen.net> | 2013-01-16 16:11:21 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-01-16 16:11:21 +0100 |
commit | 1940b08d47350f8cbf84ad1c13170c7c7505b5aa (patch) | |
tree | 18850d2a588cca1cc76e385122c65c24630169c0 /app/controllers/call_routes_controller.rb | |
parent | dc68dbecc380e94322aa2777fcbb5be1f4b0af99 (diff) | |
parent | 225a812d5f2da7dc205c021a571ff3c6d5307f20 (diff) |
Merge branch 'develop' of github.com:amooma/GS5 into develop
Conflicts:
misc/freeswitch/scripts/dialplan/router.lua
Diffstat (limited to 'app/controllers/call_routes_controller.rb')
-rw-r--r-- | app/controllers/call_routes_controller.rb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/app/controllers/call_routes_controller.rb b/app/controllers/call_routes_controller.rb new file mode 100644 index 0000000..631339b --- /dev/null +++ b/app/controllers/call_routes_controller.rb @@ -0,0 +1,41 @@ +class CallRoutesController < ApplicationController + def index + @call_routes = CallRoute.all + end + + def show + @call_route = CallRoute.find(params[:id]) + end + + def new + @call_route = CallRoute.new + end + + def create + @call_route = CallRoute.new(params[:call_route]) + if @call_route.save + redirect_to @call_route, :notice => t('call_routes.controller.successfuly_created') + else + render :new + end + end + + def edit + @call_route = CallRoute.find(params[:id]) + end + + def update + @call_route = CallRoute.find(params[:id]) + if @call_route.update_attributes(params[:call_route]) + redirect_to @call_route, :notice => t('call_routes.controller.successfuly_updated') + else + render :edit + end + end + + def destroy + @call_route = CallRoute.find(params[:id]) + @call_route.destroy + redirect_to call_routes_url, :notice => t('call_routes.controller.successfuly_destroyed') + end +end |