aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/referentials_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/referentials_controller.rb')
-rw-r--r--app/controllers/referentials_controller.rb18
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