github.com/jacobsoderblom/buffalo@v0.11.0/generators/resource/templates/actions/resource-name.go.tmpl (about) 1 package actions 2 3 import "github.com/gobuffalo/buffalo" 4 5 type {{.opts.Name.Resource}}Resource struct{ 6 buffalo.Resource 7 } 8 9 {{ range $a := .actions }} 10 // {{$a}} default implementation. 11 func (v {{$.opts.Name.Resource}}Resource) {{$a}}(c buffalo.Context) error { 12 return c.Render(200, r.String("{{$.opts.Model.Model}}#{{$a}}")) 13 } 14 15 {{end}}