amatsuda / jb

A simple and fast JSON API template engine for Ruby on Rails
MIT License
1.29k stars 43 forks source link

Add note about using render without a partial path #14

Closed frodsan closed 5 years ago

frodsan commented 7 years ago

When the collection is empty, the partial path is nil (https://github.com/rails/rails/blob/master/actionview/lib/action_view/renderer/partial_renderer.rb#L384..L385), and the renderer cannot find a template that can be monkey-patched (https://github.com/rails/rails/blob/master/actionview/lib/action_view/renderer/partial_renderer.rb#L418).

This is expected behaviour from ActionView, so I think we should just update the README to make it clear.

Related to #8, #11.

amatsuda commented 5 years ago

Thanks!