Accidentally found that with nice partials all code within partial block executed twice.
Looks like this is needed to identify yield blocks prior to rendering.
You can check it by having form with nested has_many association fields embedded as block.
When rendered first time, nested inputs will have [0] index.
When rendered second time, inputs will have non-zero index.
If you have more partials nested to each other, it looks like nice partials will execute all code 2^N times, where N is level of partials nesting.
This probably may affect performance.
Accidentally found that with nice partials all code within partial block executed twice.
Looks like this is needed to identify yield blocks prior to rendering.
You can check it by having form with nested has_many association fields embedded as block.
When rendered first time, nested inputs will have [0] index.
When rendered second time, inputs will have non-zero index.
If you have more partials nested to each other, it looks like nice partials will execute all code 2^N times, where N is level of partials nesting.
This probably may affect performance.