Files
openfoodnetwork/app/controllers/spree/admin/taxonomies_controller.rb
2019-09-20 15:12:38 +01:00

22 lines
452 B
Ruby

module Spree
module Admin
class TaxonomiesController < ResourceController
respond_to :json, :only => [:get_children]
def get_children
@taxons = Taxon.find(params[:parent_id]).children
end
private
def location_after_save
if @taxonomy.created_at == @taxonomy.updated_at
edit_admin_taxonomy_url(@taxonomy)
else
admin_taxonomies_url
end
end
end
end
end