diff options
| author | vlatka pavisic | 2016-11-09 15:10:29 +0100 |
|---|---|---|
| committer | vlatka pavisic | 2016-11-09 15:10:29 +0100 |
| commit | 21c6807d2167ffdbcaed58844d1ebafb06c22d6e (patch) | |
| tree | d4f0bca5b97266f08a956de2b946a1bf79a3e964 /app/controllers | |
| parent | 56c0f55d2d8d566b931664b85c76dbe3a58e31cc (diff) | |
| parent | 0dbc80d54b1362c9eb0fc87d8d93f3d60ade68e1 (diff) | |
| download | chouette-core-21c6807d2167ffdbcaed58844d1ebafb06c22d6e.tar.bz2 | |
Refs #1872 : Fix conflicts
Diffstat (limited to 'app/controllers')
5 files changed, 5 insertions, 8 deletions
diff --git a/app/controllers/referential_companies_controller.rb b/app/controllers/referential_companies_controller.rb index 104deba9f..a369488ba 100644 --- a/app/controllers/referential_companies_controller.rb +++ b/app/controllers/referential_companies_controller.rb @@ -27,7 +27,7 @@ class ReferentialCompaniesController < ChouetteController end def collection - @q = referential.companies.search(params[:q]) + @q = referential.workbench.companies.search(params[:q]) @companies ||= @q.result(:distinct => true).order(:name).paginate(:page => params[:page]) end diff --git a/app/controllers/referential_group_of_lines_controller.rb b/app/controllers/referential_group_of_lines_controller.rb index d40fd6090..4decef558 100644 --- a/app/controllers/referential_group_of_lines_controller.rb +++ b/app/controllers/referential_group_of_lines_controller.rb @@ -55,7 +55,7 @@ class ReferentialGroupOfLinesController < ChouetteController end def collection - @q = referential.group_of_lines.search(params[:q]) + @q = referential.workbench.group_of_lines.search(params[:q]) @group_of_lines ||= @q.result(:distinct => true).order(:name).paginate(:page => params[:page]) end diff --git a/app/controllers/referential_networks_controller.rb b/app/controllers/referential_networks_controller.rb index 2d3f4ad6b..00c680c65 100644 --- a/app/controllers/referential_networks_controller.rb +++ b/app/controllers/referential_networks_controller.rb @@ -35,7 +35,7 @@ class ReferentialNetworksController < ChouetteController end def collection - @q = referential.networks.search(params[:q]) + @q = referential.workbench.networks.search(params[:q]) @networks ||= @q.result(:distinct => true).order(:name).paginate(:page => params[:page]) end diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb index 3ae59f975..003c85d3a 100644 --- a/app/controllers/referentials_controller.rb +++ b/app/controllers/referentials_controller.rb @@ -57,11 +57,7 @@ class ReferentialsController < BreadcrumbController end def create_resource(referential) - if referential.created_from - referential.clone_association referential.created_from - else - referential.organisation = current_organisation - end + referential.organisation = current_organisation unless referential.created_from super end diff --git a/app/controllers/stop_areas_controller.rb b/app/controllers/stop_areas_controller.rb index 8f6a1565a..1f55b1de8 100644 --- a/app/controllers/stop_areas_controller.rb +++ b/app/controllers/stop_areas_controller.rb @@ -26,6 +26,7 @@ class StopAreasController < BreadcrumbController end def add_children + authorize stop_area @stop_area = stop_area @children = stop_area.children build_breadcrumb :edit |
