summaryrefslogtreecommitdiff
path: root/app/controllers/call_routes_controller.rb
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-01-16 08:33:45 -0500
committerPeter Kozak <spag@golwen.net>2013-01-16 08:33:45 -0500
commit113e3c6c6117fbeca7b9bf1f0e6dc26b0db9c407 (patch)
treeaca6e293b1e9ce855bef23954dd59ab4e3c5b32c /app/controllers/call_routes_controller.rb
parent076a5fa7b4b6d16281eb7d510ff8e7e21154caf9 (diff)
call_routes added
Diffstat (limited to 'app/controllers/call_routes_controller.rb')
-rw-r--r--app/controllers/call_routes_controller.rb41
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