muichkine
muichkine

Reputation: 2940

require a file in a .rabl

I'm using RABL for my API building in rails and I have this tiny function that I use a LOT in my .rabl files. Is there to put it in a .rabl or .rb file somewhere and require that file in all my .rabls ?

Upvotes: 0

Views: 215

Answers (2)

Pierre-Louis Gottfrois
Pierre-Louis Gottfrois

Reputation: 17631

You can use helpers in your rabl templates. See here for more details.

Upvotes: 0

ksol
ksol

Reputation: 12235

It seems to me that you have access to your view helpers in RABL. Isn't it sufficient for what you're trying to achieve ?

Upvotes: 1

Related Questions