diff options
| author | Luc Donnet | 2016-11-18 18:22:54 +0100 |
|---|---|---|
| committer | Luc Donnet | 2016-11-18 18:22:54 +0100 |
| commit | 129d7bfe13a2b7e92ec696ef91bfa9211a6ff07e (patch) | |
| tree | b079c2e55c6ad1b0a53f3f781dd63360f65d34ee /app/controllers/referentials_controller.rb | |
| parent | d4f49e51d138050a6c27fef2573649e607d56381 (diff) | |
| parent | a6f8318aa267e3723eb4c10647447ff08cd5fdca (diff) | |
| download | chouette-core-129d7bfe13a2b7e92ec696ef91bfa9211a6ff07e.tar.bz2 | |
Merge branch 'master' of github.com:AF83/stif-boiv
Diffstat (limited to 'app/controllers/referentials_controller.rb')
| -rw-r--r-- | app/controllers/referentials_controller.rb | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb index ab494ac2e..74eb36aa6 100644 --- a/app/controllers/referentials_controller.rb +++ b/app/controllers/referentials_controller.rb @@ -15,10 +15,9 @@ class ReferentialsController < BreadcrumbController end end - def create - - create! - end + # def create + # create! + # end def show resource.switch @@ -34,13 +33,20 @@ class ReferentialsController < BreadcrumbController end end + def destroy + workbench = referential.workbench_id + + referential.destroy! + redirect_to workbench_path(workbench), notice: t('notice.referential.deleted') + end + def archive referential.archive! - redirect_to referential_path, notice: t('notice.referential.archived') + redirect_to workbench_path(referential.workbench_id), notice: t('notice.referential.archived') end def unarchive referential.unarchive! - redirect_to referential_path, notice: t('notice.referential.unarchived') + redirect_to workbench_path(referential.workbench_id), notice: t('notice.referential.unarchived') end protected |
