Project

General

Profile

Actions

Bug #4712

closed

Editing organization gives undefined method `parent_taxonomy_selected_location_path'

Added by Dominic Cleal about 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Organizations and Locations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When organisations are enabled, but not locations, you can get errors trying to resolve routes for the "other" taxonomy when editing an organisation.

ActionView::Template::Error (undefined method `parent_taxonomy_selected_location_path' for #<#<Class:0x000000077546d8>:0x00000007adf000>):
    5:   <%= select_f f, :parent_id, taxonomy.class.where("id NOT IN (#{taxonomy.subtree_ids.join(',')})").order(:title), :id, :title, { :include_blank => true },
    6:                { :label => _('Parent'), :onchange => 'parent_taxonomy_changed(this);',
    7:                  :help_inline => :indicator,
    8:                  :'data-url' => parent_taxonomy_selected_location_path(taxonomy.id)
    9:                } %>
    10: 
    11:   <%= text_f f, :name %>
  app/views/taxonomies/_form.html.erb:8:in `block in _app_views_taxonomies__form_html_erb___4317518605146758171_66773220'
  app/helpers/layout_helper.rb:248:in `form_for'
  app/views/taxonomies/_form.html.erb:3:in `_app_views_taxonomies__form_html_erb___4317518605146758171_66773220'
  app/views/taxonomies/edit.html.erb:4:in `_app_views_taxonomies_edit_html_erb___4188087350678574917_64430140'
  app/controllers/concerns/foreman/controller/taxonomies_controller.rb:67:in `block in edit'
Actions

Also available in: Atom PDF