diff options
| author | Luc Donnet | 2016-11-18 16:53:43 +0100 |
|---|---|---|
| committer | Luc Donnet | 2016-11-18 16:53:43 +0100 |
| commit | 37a86f23f16f93897013e85e12efab85b1eebcd9 (patch) | |
| tree | c0505e2313b6e77e99a09d05f0bfd7fae6ee1c06 /app/controllers/referentials_controller.rb | |
| parent | 6827025a73a35788bbfb40d0ef20903cb62d27e3 (diff) | |
| parent | 9ed408bf89e9de1fdd17bfdcb40f0e2b5616de19 (diff) | |
| download | chouette-core-37a86f23f16f93897013e85e12efab85b1eebcd9.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 | 9 |
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 |
