aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/referentials_controller.rb
diff options
context:
space:
mode:
authorcedricnjanga2017-09-04 09:34:30 +0200
committercedricnjanga2017-09-04 09:34:47 +0200
commitf846b41c7e1570f3047e71fc74cbe1b2f9e13fc6 (patch)
treeec8870b17baea02fd163516f98ed8e23a97df7aa /app/controllers/referentials_controller.rb
parentadee10292855612808a8e6d1c764a148f68eb69f (diff)
downloadchouette-core-f846b41c7e1570f3047e71fc74cbe1b2f9e13fc6.tar.bz2
add some change for the Referential#new_from to only have a line collection regarding the functional scope of the current organozation
Diffstat (limited to 'app/controllers/referentials_controller.rb')
-rw-r--r--app/controllers/referentials_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb
index afd376092..2094047b1 100644
--- a/app/controllers/referentials_controller.rb
+++ b/app/controllers/referentials_controller.rb
@@ -9,7 +9,8 @@ class ReferentialsController < BreadcrumbController
def new
if params[:from]
source_referential = Referential.find(params[:from])
- @referential = Referential.new_from(source_referential)
+ @referential = Referential.new_from(source_referential, current_functional_scope)
+ @referential.workbench_id = current_organisation.workbenches.first.id
end
new! do
@@ -56,6 +57,7 @@ class ReferentialsController < BreadcrumbController
end
def destroy
+ binding.pry
workbench = referential.workbench_id
referential.destroy!