Add taxonomies controller from spree_backend

This commit is contained in:
luisramos0
2019-09-17 15:53:16 +01:00
parent 311ee92e84
commit d7a4e3a896

View File

@@ -0,0 +1,21 @@
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