You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a RABL template that shows a collection (/api/friends/index.json.rabl):
collection @friends
node(:uid) { |f| f['uid'] }
This works fine. I want to break out the node though into a partial so that I can reuse it elsewhere. I have tried this:
/api/friends/index.json.rabl:
extends 'api/friends/show'
collection @friends
And the partial (/api/friends/show.json.rabl):
node(:uid) { |f| f['uid'] }
But I am getting this error:
TypeError in Api/friends#index
Showing /opt/appname/app/views/api/friends/index.json.rabl where line #1 raised:
can't convert String into Integer
Extracted source (around line #1):
1: extends 'api/friends/show'
2: collection @friends
It seems to me that extends is what I am looking for rather than partial because I want it at the top level (not inside of a child).
The text was updated successfully, but these errors were encountered:
I have a RABL template that shows a collection (/api/friends/index.json.rabl):
This works fine. I want to break out the node though into a partial so that I can reuse it elsewhere. I have tried this:
/api/friends/index.json.rabl:
And the partial (/api/friends/show.json.rabl):
But I am getting this error:
It seems to me that extends is what I am looking for rather than partial because I want it at the top level (not inside of a child).
The text was updated successfully, but these errors were encountered: