aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/routes_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/routes_controller.rb')
-rw-r--r--app/controllers/routes_controller.rb27
1 files changed, 25 insertions, 2 deletions
diff --git a/app/controllers/routes_controller.rb b/app/controllers/routes_controller.rb
index 958d23cf9..55a700315 100644
--- a/app/controllers/routes_controller.rb
+++ b/app/controllers/routes_controller.rb
@@ -8,10 +8,33 @@ class RoutesController < ChouetteController
end
def index
- @per_page = 10
- index!
+ index! do |format|
+ format.html { redirect_to referential_line_path(@referential,@line) }
+ end
end
+ def show
+ @stop_areas = resource.stop_areas.paginate(:page => params[:page], :per_page => 10)
+ show!
+ end
+
+ def destroy
+ destroy! do |success, failure|
+ success.html { redirect_to referential_line_path(@referential,@line) }
+ end
+ end
+
+ def create
+ create! do |success, failure|
+ success.html { redirect_to referential_line_path(@referential,@line) }
+ end
+ end
+
+ def update
+ update! do |success, failure|
+ success.html { redirect_to referential_line_path(@referential,@line) }
+ end
+ end
protected
alias_method :route, :resource