Revision 89a04e1a
Added by Joseph Magen about 10 years ago
app/controllers/concerns/foreman/controller/taxonomies_controller.rb | ||
---|---|---|
|
||
included do
|
||
before_filter :find_taxonomy, :only => %w{edit update destroy clone_taxonomy assign_hosts
|
||
assign_selected_hosts assign_all_hosts step2 select}
|
||
assign_selected_hosts assign_all_hosts step2 select
|
||
parent_taxonomy_selected}
|
||
before_filter :count_nil_hosts, :only => %w{index create step2}
|
||
skip_before_filter :authorize, :set_taxonomy, :only => %w{select clear}
|
||
end
|
||
... | ... | |
redirect_to send("#{taxonomies_plural}_path"), :notice => _("Selected hosts are now assigned to %s") % @taxonomy.name
|
||
end
|
||
|
||
def parent_taxonomy_selected
|
||
return head(:not_found) unless @taxonomy
|
||
@taxonomy.parent_id = params[:parent_id]
|
||
render :partial => "taxonomies/form", :locals => {:taxonomy => @taxonomy}
|
||
end
|
||
|
||
private
|
||
|
||
def taxonomy_id
|
Also available in: Unified diff
fixes #4617 - add feature to change parent of location or organization