aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorAlban Peignier2016-11-19 21:10:33 +0100
committerAlban Peignier2016-11-19 21:10:33 +0100
commitdf3492f334e28bc615d5e6dd989eab2558eee464 (patch)
treecea1a7c67101e7456264369ec26078b143c7d6dc /app/controllers
parentd29d55282e99245cb7cf6d1ce5e017b0652eaf97 (diff)
downloadchouette-core-df3492f334e28bc615d5e6dd989eab2558eee464.tar.bz2
Add support for Ransack search on has_array_of collection. Refs #1782
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/referentials_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb
index b6c82df5d..ae3411dab 100644
--- a/app/controllers/referentials_controller.rb
+++ b/app/controllers/referentials_controller.rb
@@ -33,6 +33,14 @@ class ReferentialsController < BreadcrumbController
end
end
+ def edit
+ edit! do
+ if @referential.in_workbench?
+ @referential.init_metadatas first_period_begin: Date.today, first_period_end: Date.today.advance(months: 1)
+ end
+ end
+ end
+
def destroy
workbench = referential.workbench_id