thoughtbot / props_template

A very fast json builder for Rails
MIT License
145 stars 4 forks source link

Enable template rendering in API only Rails apps #15

Closed AbelToy closed 7 months ago

AbelToy commented 7 months ago

I tried to migrate from jbuilder to props_template on a Rails app with config.api_only set to true, and I was surprised that all my specs were failing when my requests returned 204 No Content.

It turns out, api_only disables template rendering, as well as helpers and implicit rendering.

Similar gems such as jbuilder or jb re-enable those in their railtie file. I think props_template could be helpful by doing the same.

jho406 commented 7 months ago

This looks great @AbelToy! I'll get this one merge soon.