Turbo/ControllerFrames
// app/controllers/post_controller/postcontroller.go
package postcontroller
import "golazy.dev/lazycontroller"
func (c *PostsController) Show(post *Post) error {
c.Set("post", post)
return c.Wants(lazycontroller.Formats{
lazycontroller.HTML: func() error {
return nil
},
lazycontroller.TurboFrame: func() error {
return c.RenderTurboFrame("post")
},
})
}