Alice Spencer

Joined

10 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in How to limit comment nesting with Hotwire and Turbo?

Great question! In the Hotwire/Turbo version, you can still enforce nesting depth by checking comment.depth (or a helper like max_depth?) in the partial that renders the reply form. Simply avoid rendering the reply form when the max is reached, and guard on the server side too. I ran into something similar building a small demo for Crazy Cattle 3D and this pattern kept things clean and predictable.