We have multiple apis with multiple versions, and what I want is to specify that rabl renders partials with requested path. So for example:
When user requests for api/patients/v2/consultations/index, we're rendering views/api/patients/v2/consultations/index.rabl
In that rabl, we're doing
partial 'motives/index', object: m and we get an error
_Cannot find rabl template 'motives/index within registered (["MyUser/projects/myproject/app/views"] view paths!)
If I render partial like this:
partial 'api/patients/v2/motives/index, object: m everything works good!
So what I want is to dynamically specify this part api/patients/v2/ as it will be always the same as request.url.
And then simple partial motive/index it will knows to what
app/views/api{resource}/{version}/motive/index.rabl should lookup.
Hi all,
We have multiple apis with multiple versions, and what I want is to specify that rabl renders partials with requested path. So for example: When user requests for api/patients/v2/consultations/index, we're rendering views/api/patients/v2/consultations/index.rabl
In that rabl, we're doing
partial 'motives/index', object: m
and we get an error _Cannot find rabl template 'motives/index within registered (["MyUser/projects/myproject/app/views"] view paths!)If I render partial like this:
partial 'api/patients/v2/motives/index, object: m
everything works good!So what I want is to dynamically specify this part
api/patients/v2/
as it will be always the same asrequest.url
. And then simplepartial motive/index
it will knows to whatapp/views/api{resource}/{version}/motive/index.rabl
should lookup.Any idea?