Created
March 12, 2014 18:34
-
-
Save diatmpravin/9513386 to your computer and use it in GitHub Desktop.
Revel Sample Controller
This file contains hidden or 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" | |
"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
there's a missing bracket
https://gist.github.com/9513386.git