Last active
August 29, 2015 14:00
-
-
Save icambridge/11321687 to your computer and use it in GitHub Desktop.
Force template format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c.Request.Format = "json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers | |
import "github.com/revel/revel" | |
type Test struct { | |
*revel.Controller | |
} | |
func (c Test) List() revel.Result { | |
c.Request.Format = "json" | |
return c.Render() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This would result in views/test/list.json being used as the template.