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.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb
index 003c85d3a..ab494ac2e 100644
--- a/app/controllers/referentials_controller.rb
+++ b/app/controllers/referentials_controller.rb
@@ -8,11 +8,18 @@ class ReferentialsController < BreadcrumbController
def new
@referential = Referential.new_from(Referential.find(params[:from])) if params[:from]
+
new! do
@referential.data_format = current_organisation.data_format
+ @referential.workbench_id = params[:workbench_id] if params[:workbench_id]
end
end
+ def create
+
+ create!
+ end
+
def show
resource.switch
show! do |format|
@@ -24,7 +31,6 @@ class ReferentialsController < BreadcrumbController
:referential_id => resource.id}
}
format.html { build_breadcrumb :show}
-
end
end
@@ -76,6 +82,7 @@ class ReferentialsController < BreadcrumbController
:data_format,
:archived_at,
:created_from_id,
+ :workbench_id,
referential_metadata_attributes: [:referential_source_id, :line_ids => []]
)
end