blob: 03dab3f8f50be043aa580015eb2a5e3f991d00a0 (
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
 | class LineReferentialsController < ChouetteController
  defaults :resource_class => LineReferential
  def sync
    authorize resource, :synchronize?
    @sync = resource.line_referential_syncs.build
    if @sync.save
      flash[:notice] = t('notice.line_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
  def line_referential_params
    params.require(:line_referential).permit(:sync_interval)
  end
end
 |