Skip to content

Instantly share code, notes, and snippets.

@goen
Forked from diatmpravin/task.go
Created November 20, 2014 16:08
Show Gist options
  • Save goen/7d4c4450cad6e5eb9ab9 to your computer and use it in GitHub Desktop.
Save goen/7d4c4450cad6e5eb9ab9 to your computer and use it in GitHub Desktop.
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())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment