blob: 0e6a54b495a37871694504f6784a2f659cd611f3 (
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
|
class StopAreaReferentialsController < ChouetteController
defaults :resource_class => StopAreaReferential
def show
show! do
@stop_area_referential = StopAreaReferentialDecorator.decorate(@stop_area_referential)
end
end
def sync
authorize resource, :synchronize?
@sync = resource.stop_area_referential_syncs.build
if @sync.save
flash[:notice] = t('notice.stop_area_referential_sync.created')
else
flash[:error] = @sync.errors.full_messages.to_sentence
end
redirect_to resource
end
protected
def begin_of_chain
current_organisation
end
end
|