How to construct the following JSONAPI url in Rails? -


im following http://jsonapi.org/format/#document-top-level

i notice following end-point (route):

/articles/1/relationships/author 

in rails, how route contstructed in routes.rb?

resources :articles   # goes here?   # should relationship namespace or other?   # guess author can defined collection, or simple end 

relationships doesn't need have of 7 restful actions.

the route should following code snippets:

resources :articles    resources :relationships, :only => []      collection         :author      end    end end 

this how route file should like. please let me know if update needed.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -