render in the controller compared to render , different methods are used in the view. Ultimately, the controller calls render in the view, but the controller's render method itself expects to be called only once. It looks like this:
# Check for double render errors and set the content_type after rendering. def render(*args)
Notice how it rises if called more than once?
When you call helper_method , you give the proxy a view of the version of the render controller, which is not intended to be used in the same way as the ActionView , which , unlike the controller, it is expected that it will be called repeating to do partial and something else.
source share