blob: 22b23cff5dda86d6c50b327d4d6b2ac7961a2480 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
class StopPointsController < ChouetteController
defaults :resource_class => Chouette::StopPoint
respond_to :html
belongs_to :referential do
belongs_to :line, :parent_class => Chouette::Line do
belongs_to :route, :parent_class => Chouette::Route
end
end
alias_method :route, :parent
def create
create! do |success, failure|
success.html { redirect_to :action => :index }
end
end
def sort
if route.reorder!( params[:stop_point])
flash[:notice] = t("stop_points.reorder_success")
else
flash[:alert] = t("stop_points.reorder_failure")
end
redirect_to :action => :index
end
end
|