Skip to content

Instantly share code, notes, and snippets.

@wfaler
Created January 17, 2011 22:54
Show Gist options
  • Save wfaler/783654 to your computer and use it in GitHub Desktop.
Save wfaler/783654 to your computer and use it in GitHub Desktop.
widgetcontroller.scala
case class Widget(id: Long, name: String, priceInPence: Int)
class WidgetController extends Controller with Renderable with FunctionNameConventionRoutes{
def `GET /showAWidget` = {
val myWidget = Widget(1, "My Widget", 1000)
render(myWidget)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment