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

android - questions about switching from C2DM to GCM -

c++ - Qt setGeometry: Unable to set geometry -

batch file - How to extract all multi-volume RAR archives from subfolders of a folder? -