Make json api adapter 'include' option accept an array, accommodate comma delimited string for legacy reasons

This commit is contained in:
Robbie Pitts
2015-01-12 14:54:06 -05:00
parent b8df4b57a1
commit ad5677c4ec
6 changed files with 144 additions and 105 deletions

View File

@@ -52,7 +52,7 @@ module ActionController
def render_resource_with_nested_has_many_include
setup_post
render json: @post, include: 'author,author.roles', adapter: :json_api
render json: @post, include: ['author', 'author.roles'], adapter: :json_api
end
def render_resource_with_missing_nested_has_many_include
@@ -74,7 +74,7 @@ module ActionController
def render_collection_with_include
setup_post
render json: [@post], include: 'author,comments', adapter: :json_api
render json: [@post], include: ['author', 'comments'], adapter: :json_api
end
end