-
-
Save dhoss/4575418 to your computer and use it in GitHub Desktop.
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 play.api._ | |
import play.api.mvc._ | |
import org.squeryl.PrimitiveTypeMode._ | |
import models.{Database, FrontPageUpdate} | |
import com.codahale.jerkson.Json | |
object Application extends Controller { | |
def index = Action { | |
val updates = Database.frontPageUpdates | |
views.html.index(updates.all()) | |
} | |
} |
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
value all is not a member of org.squeryl.Query[models.FrontPageUpdate] | |
In /Users/daustin/web-dev/lumos-pottery/app/controllers/Application.scala at line 16. | |
12 val updates = from(Database.frontPageUpdates)( | |
13 u => select(u) | |
14 orderBy(u.created_on desc) | |
15 ) | |
16 Ok(views.html.index(updates.all)) | |
17 } |
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
@(updates: List[FrontPageUpdate]) | |
@import helper._ | |
@main("Lumos Pottery") { | |
<script src="@routes.Assets.at("javascripts/index.min.js")" type="text/javascript"></script> | |
<div id="welcome">Welcome text goes here</div> | |
<div id="updates"> | |
<ul> | |
@updates.map { update => | |
<li>@update.title</li> | |
} | |
</ul> | |
</div> | |
} |
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 play.api._ | |
import play.api.mvc._ | |
import org.squeryl.PrimitiveTypeMode._ | |
import models.{Database, FrontPageUpdate} | |
import com.codahale.jerkson.Json | |
object Application extends Controller { | |
def index = Action { | |
val updates = Database.frontPageUpdates | |
views.html.index(updates.all()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment