Use ams_prefix not ams_suffix!

This commit is contained in:
Rob Harrington
2015-11-05 17:17:45 +11:00
parent 73c80cb5e5
commit eb7b2e7a3b
2 changed files with 6 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
angular.module("admin.enterprises").controller 'enterprisesCtrl', ($scope, $q, Enterprises, Columns) ->
requests = []
requests.push ($scope.allEnterprises = Enterprises.index(ams_suffix: "index")).$promise
requests.push ($scope.allEnterprises = Enterprises.index(ams_prefix: "index")).$promise
$q.all(requests).then ->
$scope.loaded = true

View File

@@ -15,7 +15,7 @@ module Admin
respond_to do |format|
format.html
format.json do
render_as_json @collection, ams_prefix: params[:ams_suffix], current_user: spree_current_user
render_as_json @collection, ams_prefix: params[:ams_prefix], current_user: spree_current_user
end
end
end
@@ -163,5 +163,9 @@ module Admin
end
end
end
def ams_prefix_whitelist
[:basic]
end
end
end