app/assets/javascripts/spree/backend/taxon_autocomplete.js in spree_backend-3.1.14 vs app/assets/javascripts/spree/backend/taxon_autocomplete.js in spree_backend-3.2.0.rc1
- old
+ new
@@ -8,20 +8,20 @@
if ($(selector).length > 0) {
$(selector).select2({
placeholder: Spree.translations.taxon_placeholder,
multiple: true,
initSelection: function (element, callback) {
- var url = Spree.url(Spree.routes.taxons_search, {
+ var url = Spree.url(Spree.routes.taxons_api, {
ids: element.val(),
without_children: true,
token: Spree.api_key
});
return $.getJSON(url, null, function (data) {
return callback(data['taxons']);
});
},
ajax: {
- url: Spree.routes.taxons_search,
+ url: Spree.routes.taxons_api,
datatype: 'json',
data: function (term, page) {
return {
per_page: 50,
page: page,