Skip to content

Commit

Permalink
Fix "undefined method `singularize' for :results:Symbol" error
Browse files Browse the repository at this point in the history
AMS requires that `root` be set to a string:
rails-api/active_model_serializers#2223
  • Loading branch information
dmann committed Sep 19, 2019
1 parent c61e522 commit aa5c383
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/api/dds/v1/storage_providers_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class StorageProvidersAPI < Grape::API
{code: 401, message: 'Unauthorized'}
]
end
get '/storage_providers', adapter: :json, root: :results do
get '/storage_providers', adapter: :json, root: 'results' do
authenticate!
StorageProvider.all
end
Expand Down
2 changes: 1 addition & 1 deletion app/api/dds/v1/system_permissions_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class SystemPermissionsAPI < Grape::API
{code: 401, message: 'Unauthorized'}
]
end
get '/system/permissions', adapter: :json, root: :results do
get '/system/permissions', adapter: :json, root: 'results' do
authenticate!
authorize SystemPermission.new, :index?
policy_scope(SystemPermission).all
Expand Down

0 comments on commit aa5c383

Please sign in to comment.