Skip to content

Instantly share code, notes, and snippets.

@diatmpravin
Created March 12, 2014 18:34
Show Gist options
  • Save diatmpravin/9513386 to your computer and use it in GitHub Desktop.
Save diatmpravin/9513386 to your computer and use it in GitHub Desktop.
Revel Sample Controller
package controllers
import (
"github.com/revel/revel"
"ToGo/app/models"
"ToGo/app/routes"
"github.com/jinzhu/gorm"
type Task struct {
ModelController
}
func (c Task) Index() revel.Result {
return c.Render()
}
func (c Task) Add(task string) revel.Result {
return c.Redirect(routes.Task.Index())
func (c Task) Done(taskId int64) revel.Result {
return c.Redirect(routes.Task.Index())
}
func (c Task) Undone(taskId int64) revel.Result {
return c.Redirect(routes.Task.Index())
}
@goen
Copy link

goen commented Nov 20, 2014

there's a missing bracket

https://gist.github.com/9513386.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment