Skip to content

Instantly share code, notes, and snippets.

View argius's full-sized avatar
💭
I may be slow to respond.

argius argius

💭
I may be slow to respond.
View GitHub Profile
@argius
argius / index.html.jade
Last active August 29, 2015 14:00
Try to shorten pagination codes in Skinny 1.0.9
ul.pagination
li
- for (i <- (0 to totalPages + 1); p <- Seq(if (i == 0) (1, "&laquo;") else if (i == totalPages + 1) (totalPages, "&raquo;") else (i, i.toString)))
li
a(href={s.url(Controllers.members.indexUrl, "page" -> p._1)}) #{unescape(p._2)}
@argius
argius / ScaffoldFromDb.scala
Created February 27, 2014 13:51
( See comment ) ScaffoldFromDb runs Skinny Framework's Scaffold with infos extracted from existing database tables.
/**
* ScaffoldFromDbTask - adapter of ScaffoldGenerator
*
* This task requires to add db setting files (application.conf) into classpath.
*/
object ScaffoldFromDb {
import skinny._
import skinny.task.generator._
import scalikejdbc._